Skip to content

Commit

Permalink
- fix for building on 64bit architecture
Browse files Browse the repository at this point in the history
- fixed dependencies of designer-plugin/stuff


git-svn-id: http://svn.osgeo.org/qgis/trunk@2956 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jobi committed Mar 13, 2005
1 parent 4ecbd81 commit 14b2185
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 19 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Expand Up @@ -3,6 +3,10 @@ QGIS Change Log
** Applied patches from M. Loskot for a build error and missing Q_OBJECT
macros in qgsspit.h and qgsattributetable.h
2005-01-01 [larsl] 0.6.0devel4
2005-03-13 [jobi] 0.6.0devel6
- fix for building on 64bit architecture
- fixed dependencies of designer-plugin/stuff
2005-01-01 [larsl] 0.6.0devel4
** Fixed a bug that crashed QGIS when loading rasters from a project file, pt 2
QGIS Change Log
2005-01-01 [larsl] 0.6.0devel3
Expand Down
33 changes: 24 additions & 9 deletions acinclude.m4
@@ -1,3 +1,18 @@
dnl ------------------------------------------------------------------------
dnl Detect if this is a 64bit environment
dnl
dnl it sets:
dnl _lib
dnl ------------------------------------------------------------------------
AC_DEFUN([AQ_CHECK_LIB64],
[
if test `echo ${libdir} | sed -e 's#.*lib64.*#64#'` = "64"; then
_lib="lib64"
else
_lib="lib"
fi
])

dnl ------------------------------------------------------------------------
dnl Detect GDAL/OGR
dnl
Expand Down Expand Up @@ -117,7 +132,7 @@ AC_MSG_CHECKING([QTDIR])
AC_ARG_WITH([qtdir], [ --with-qtdir=DIR Qt installation directory [default=/usr/local]], QTDIR=$withval)
# Check that QTDIR is defined or that --with-qtdir given
if test x$QTDIR = x ; then
QT_SEARCH="/usr/lib/qt31 /usr/local/qt31 /usr/lib/qt3 /usr/local/qt3 /usr/lib/qt2 /usr/local/qt2 /usr/lib/qt /usr/local/qt /usr /usr/local"
QT_SEARCH=" /usr/lib/qt31 /usr/lib64/qt31 /usr/local/qt31 /usr/lib/qt3 /usr/lib64/qt3 /usr/local/qt3 /usr/lib/qt2 /usr/lib64/qt2 /usr/local/qt2 /usr/lib/qt /usr/lib64/qt /usr/local/qt /usr /usr/local"
for i in $QT_SEARCH; do
if test x$QTDIR = x; then
if test -f $i/include/qt/qglobal.h -o -f $i/include/qglobal.h -o -f $i/include/qt3/qglobal.h; then
Expand Down Expand Up @@ -243,9 +258,9 @@ case "${host}" in
;;
*)
# determin static or dynamic -- prefer dynamic
QT_IS_DYNAMIC=`ls $QTDIR/lib/libqt*.so 2> /dev/null`
QT_IS_DYNAMIC=`ls $QTDIR/${_lib}/libqt*.so 2> /dev/null`
if test "x$QT_IS_DYNAMIC" = x; then
QT_IS_STATIC=`ls $QTDIR/lib/libqt*.a 2> /dev/null`
QT_IS_STATIC=`ls $QTDIR/${_lib}/libqt*.a 2> /dev/null`
if test "x$QT_IS_STATIC" = x; then
QT_IS_STATIC="no"
AC_MSG_ERROR([*** Couldn't find any Qt libraries])
Expand All @@ -256,20 +271,20 @@ case "${host}" in
QT_IS_STATIC="no"
fi
# set link parameters based on shared/mt libs or static lib
if test "x`ls $QTDIR/lib/libqt.a* 2> /dev/null`" != x ; then
if test "x`ls $QTDIR/${_lib}/libqt.a* 2> /dev/null`" != x ; then
QT_LIB="-lqt"
QT_IS_MT="no"
elif test "x`ls $QTDIR/lib/libqt-mt.so* 2> /dev/null`" != x ; then
elif test "x`ls $QTDIR/${_lib}/libqt-mt.so* 2> /dev/null`" != x ; then
QT_LIB="-lqt-mt"
QT_IS_MT="yes"
elif test "x`ls $QTDIR/lib/libqt.so* 2> /dev/null`" != x ; then
elif test "x`ls $QTDIR/${_lib}/libqt.so* 2> /dev/null`" != x ; then
QT_LIB="-lqt"
QT_IS_MT="no"
elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
elif test "x`ls $QTDIR/${_lib}/libqte.* 2> /dev/null`" != x ; then
QT_LIB="-lqte"
QT_IS_MT="no"
QT_IS_EMBEDDED="yes"
elif test "x`ls $QTDIR/lib/libqte-mt.* 2> /dev/null`" != x ; then
elif test "x`ls $QTDIR/${_lib}/libqte-mt.* 2> /dev/null`" != x ; then
QT_LIB="-lqte-mt"
QT_IS_MT="yes"
QT_IS_EMBEDDED="yes"
Expand Down Expand Up @@ -358,7 +373,7 @@ if test x"$QT_IS_MT" = "xyes" ; then
QT_CXXFLAGS="$QT_CXXFLAGS -D_REENTRANT -DQT_THREAD_SUPPORT"
fi
QT_LDADD="-L$QTDIR/lib $QT_LIBS"
QT_LDADD="-L$QTDIR/${_lib} $QT_LIBS"
if test x$QT_IS_STATIC = xyes ; then
OLDLIBS="$LIBS"
Expand Down
22 changes: 17 additions & 5 deletions configure.in
Expand Up @@ -26,7 +26,7 @@ dnl ---------------------------------------------------------------------------
MAJOR_VERSION=0
MINOR_VERSION=6
MICRO_VERSION=0
EXTRA_VERSION=5
EXTRA_VERSION=6
if test $EXTRA_VERSION -eq 0; then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
else
Expand Down Expand Up @@ -72,6 +72,12 @@ AC_CHECK_HEADERS([endian.h])
AC_CHECK_HEADERS([machine/endian.h])


dnl ---------------------------------------------------------------------------
dnl check lib64 environment
dnl ---------------------------------------------------------------------------
AQ_CHECK_LIB64


dnl ---------------------------------------------------------------------------
dnl Qt check
dnl ---------------------------------------------------------------------------
Expand Down Expand Up @@ -168,6 +174,12 @@ AM_CONDITIONAL([HAVE_SPIT], [test "$ac_spit" = "yes"])
dnl ---------------------------------------------------------------------------
dnl GRASS package
dnl ---------------------------------------------------------------------------
if test "$libdir" = "/usr/lib64"; then
_lib="lib64"
else
_lib="lib"
fi

AC_ARG_WITH(grass,
AC_HELP_STRING([--with-grass=DIR],[GRASS Support (full path to GRASS binary package, e.g. --with-grass=/usr1/grass57/dist.i686-pc-linux-gnu)]))

Expand All @@ -176,19 +188,19 @@ AC_ARG_WITH(grass,
if test -n "$with_grass" -a x"$with_grass" != "xno"; then
# I don't know how to add library path to AC_CHECK_LIB()
if test ! -f "$GISLIB"; then
GISLIB=`ls $with_grass/lib/libgrass_gis.dylib 2> /dev/null`
GISLIB=`ls $with_grass/${_lib}/libgrass_gis.dylib 2> /dev/null`
fi
if test ! -f "$GISLIB"; then
GISLIB=`ls $with_grass/lib/libgrass_gis.so 2> /dev/null`
GISLIB=`ls $with_grass/${_lib}/libgrass_gis.so 2> /dev/null`
fi
if test ! -f "$GISLIB"; then
GISLIB=`ls $with_grass/lib/libgrass_gis.a 2> /dev/null`
GISLIB=`ls $with_grass/${_lib}/libgrass_gis.a 2> /dev/null`
fi

if test ! -f "$GISLIB"; then
AC_MSG_ERROR( [GRASS library not found] )
fi
GRASS_LIB="-L$with_grass/lib/ -lgrass_vect -lgrass_dig2 -lgrass_dbmiclient -lgrass_dbmibase -lgrass_shape -lgrass_dgl -lgrass_rtree -lgrass_gis -lgrass_datetime -lgrass_linkm -lgrass_form -lgrass_gproj"
GRASS_LIB="-L$with_grass/${_lib} -lgrass_vect -lgrass_dig2 -lgrass_dbmiclient -lgrass_dbmibase -lgrass_shape -lgrass_dgl -lgrass_rtree -lgrass_gis -lgrass_datetime -lgrass_linkm -lgrass_form -lgrass_gproj"

GISINC=`ls $with_grass/include/gis.h`
if test ! -f "$GISINC"; then
Expand Down
10 changes: 5 additions & 5 deletions src/Makefile.am
Expand Up @@ -224,8 +224,6 @@ qgis_MOC = qgisapp.moc.cpp \
qgshelpviewer.moc.cpp \
qgsidentifyresults.moc.cpp \
qgslabeldialog.moc.cpp \
qgslegenditem.moc.cpp \
qgslegend.moc.cpp \
qgslinestyledialog.moc.cpp \
qgsludialog.moc.cpp \
qgsmapcanvas.moc.cpp \
Expand Down Expand Up @@ -296,8 +294,6 @@ qgis_SOURCES = main.cpp \
qgslabelattributes.cpp \
qgslabel.cpp \
qgslabeldialog.cpp \
qgslegend.cpp \
qgslegenditem.cpp \
qgsline.cpp \
qgslinestyledialog.cpp \
qgslinesymbol.cpp \
Expand Down Expand Up @@ -383,7 +379,7 @@ BUILT_SOURCES = $(qgis_MOC) $(qgis_UIMOC) $(qgis_UIHEADERS) $(qgis_UISOURCES) \
$(postgresMOC) $(postgresUIMOC) $(postgresUIHEADERS) $(postgresUISOURCES)


qgis_LDADD = $(LDADD) $(QT_LDADD) $(GDAL_LDADD) $(PG_LIB) $(GEOS_LDADD)
qgis_LDADD = $(LDADD) $(QT_LDADD) $(GDAL_LDADD) $(PG_LIB) $(GEOS_LDADD) libqgis.la
qgis_LDFLAGS = -rdynamic
qgis_CXXFLAGS = $(PREFIX) $(PLUGINPATH) $(PKGDATAPATH) $(GDAL_CFLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) -I$(PG_INC) $(DEBUG_QGIS) $(GEOS_CFLAGS)

Expand Down Expand Up @@ -429,6 +425,10 @@ libqgis_la_SOURCES = \
qgsgraduatedmarenderer.cpp \
qgsgraduatedsymrenderer.cpp \
qgslabel.cpp \
qgslegend.cpp \
qgslegend.moc.cpp \
qgslegenditem.cpp \
qgslegenditem.moc.cpp \
qgsmapcanvas.cpp \
qgsmapcanvas.moc.cpp \
qgsmaplayer.cpp \
Expand Down

0 comments on commit 14b2185

Please sign in to comment.