2004-04-17 22:07:13 +00:00
|
|
|
|
2003-09-19 02:56:45 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2004-09-13 19:34:06 +00:00
|
|
|
dnl configure.in,v 1.186 2004/09/13 19:34:05 larsl Exp
|
2004-06-24 08:04:04 +00:00
|
|
|
|
2004-06-19 12:41:29 +00:00
|
|
|
|
2003-09-19 02:56:45 +00:00
|
|
|
|
2004-01-19 18:06:01 +00:00
|
|
|
AC_INIT
|
|
|
|
|
2004-08-26 16:48:34 +00:00
|
|
|
dnl AC_CONFIG_SRCDIR([libtool])
|
2004-03-05 23:30:29 +00:00
|
|
|
|
- s/config.h/qgsconfig.h [0]
- qgsconfig.h now has header sentinals
- now will install headers in $(prefix)/qgis/include and libqis.* library in
$(prefix)/lib [1]
- "src/Makefile" no longer relies on explicit dependencies and uses better
naming scheme for created source files [2]
Notes:
[0] To eliminate any file namespace collisions. Unfortunately there will
still be some macro name collisions. These are harmless, though annoying.
What needs to happen is that all header file references to "qgsconfig.h"
be moved to implementation files, thus breaking any include dependencies
for external software.
[1] There currently does not exist a way to make this optional; these will
always install. In the future, this might be something toggleable by a
configure script option. Moreover, there does not currently exist a
"qgis-config" script for getting command line options for external,
dependant software; there might be one in a future release.
I decided to err on including too many header files; almost certainly some
of the header files that are currently installed can be culled from the
"to install" list.
The new make file has two targets: the old qgis application target, and a
second one for the library. As plug-ins are developed, there may be a
need to add more source files to the library to link against. I just
added in the bare minimum for the current set of plug-ins. If more
sources need to be added, just add them to libqgis_la_SOURCES, near the
bottom of "src/Makefile.am".
[2] All *.ui files will create corresponding *.uic.h and *.uic.cpp files.
Since these also need MOC files, *.moc.uic.cpp files are also
automatically created.
git-svn-id: http://svn.osgeo.org/qgis/trunk@1056 c8812cc2-4d05-0410-92ff-de0c093fc19c
2004-03-22 20:00:55 +00:00
|
|
|
dnl header sentinals for qgsconfig.h
|
|
|
|
AH_TOP(
|
|
|
|
[#ifndef QGSCONFIG_H
|
|
|
|
#define QGSCONFIG_H
|
|
|
|
])
|
|
|
|
AH_BOTTOM(
|
|
|
|
[#endif]
|
|
|
|
)
|
|
|
|
|
2004-03-26 11:10:51 +00:00
|
|
|
AC_PREREQ(2.52)
|
|
|
|
AC_CONFIG_HEADERS(qgsconfig.h)
|
2004-01-19 18:06:01 +00:00
|
|
|
|
2004-02-27 05:39:23 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl version number
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
MAJOR_VERSION=0
|
2004-07-02 08:02:33 +00:00
|
|
|
MINOR_VERSION=4
|
2004-02-27 05:39:23 +00:00
|
|
|
MICRO_VERSION=0
|
2004-09-13 19:34:06 +00:00
|
|
|
EXTRA_VERSION=31
|
2004-02-27 05:39:23 +00:00
|
|
|
if test $EXTRA_VERSION -eq 0; then
|
2004-03-30 22:23:08 +00:00
|
|
|
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
|
2004-02-27 05:39:23 +00:00
|
|
|
else
|
|
|
|
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}devel${EXTRA_VERSION}
|
|
|
|
fi
|
|
|
|
|
2004-06-30 11:30:40 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl library interfase version number
|
|
|
|
dnl change when lib interface changes
|
|
|
|
dnl see http://www.gnu.org/software/libtool/manual.html#TOC32
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
INTERFACE_VERSION=0:1:0
|
|
|
|
|
|
|
|
|
2004-02-27 05:39:23 +00:00
|
|
|
AM_INIT_AUTOMAKE(qgis, ${VERSION})
|
2004-01-19 18:06:01 +00:00
|
|
|
|
2004-05-05 19:29:13 +00:00
|
|
|
AC_SUBST(MAJOR_VERSION)
|
|
|
|
AC_SUBST(MINOR_VERSION)
|
|
|
|
AC_SUBST(MICRO_VERSION)
|
|
|
|
AC_SUBST(EXTRA_VERSION)
|
2004-06-30 11:30:40 +00:00
|
|
|
AC_SUBST(INTERFACE_VERSION)
|
2004-05-05 19:29:13 +00:00
|
|
|
|
2004-01-19 18:06:01 +00:00
|
|
|
AC_PREFIX_PROGRAM(gcc)
|
|
|
|
|
|
|
|
AC_PROG_CXX
|
|
|
|
|
|
|
|
AC_LANG([C++])
|
|
|
|
|
2004-02-10 03:56:45 +00:00
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
AC_LIBTOOL_DLOPEN
|
2004-01-19 18:06:01 +00:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2004-02-27 05:39:23 +00:00
|
|
|
|
2004-05-12 08:28:04 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Check for Endian stuff to manage big endian anomalies
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
AC_CHECK_HEADERS([endian.h])
|
|
|
|
AC_CHECK_HEADERS([machine/endian.h])
|
|
|
|
|
|
|
|
|
2004-02-27 05:39:23 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Qt check
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2004-04-13 20:30:31 +00:00
|
|
|
AQ_CHECK_QT
|
2004-01-19 18:06:01 +00:00
|
|
|
|
|
|
|
|
2003-09-19 02:56:45 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl GDAL/OGR
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2004-04-18 23:44:41 +00:00
|
|
|
AQ_CHECK_GDAL
|
2004-01-19 18:06:01 +00:00
|
|
|
|
|
|
|
|
2003-09-19 02:56:45 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl PostgreSQL
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2004-02-15 12:23:30 +00:00
|
|
|
AC_ARG_WITH(postgresql,
|
|
|
|
AC_HELP_STRING([--with-postgresql=path],
|
2004-01-19 18:06:01 +00:00
|
|
|
[PostgreSQL (PostGIS) Support (full path to pg_config)]))
|
2003-09-19 02:56:45 +00:00
|
|
|
|
2004-01-19 18:06:01 +00:00
|
|
|
AC_MSG_CHECKING([for PostgreSQL])
|
2004-02-15 12:23:30 +00:00
|
|
|
if test x"$with_postgresql" = "xyes" -o x"$with_postgresql" = "x" ; then
|
2004-02-10 03:56:45 +00:00
|
|
|
AC_MSG_RESULT([yes])
|
2004-01-19 18:06:01 +00:00
|
|
|
AC_PATH_PROG([PG_CONFIG], [pg_config], [no])
|
2004-02-15 12:23:30 +00:00
|
|
|
elif test x"$with_postgresql" = "xno" ; then
|
2004-02-10 03:56:45 +00:00
|
|
|
AC_MSG_RESULT([no])
|
2004-01-19 18:06:01 +00:00
|
|
|
PG_CONFIG=no
|
2003-09-19 02:56:45 +00:00
|
|
|
else
|
2004-02-10 03:56:45 +00:00
|
|
|
AC_MSG_RESULT([yes])
|
2004-02-15 12:23:30 +00:00
|
|
|
PG_CONFIG="$with_postgresql/pg_config"
|
2003-09-19 02:56:45 +00:00
|
|
|
fi
|
|
|
|
|
2004-02-10 03:56:45 +00:00
|
|
|
if test x"$PG_CONFIG" != "xno" ; then
|
2004-01-19 18:06:01 +00:00
|
|
|
PG_LIB="-L`$PG_CONFIG --libdir` -lpq"
|
2003-09-19 02:56:45 +00:00
|
|
|
PG_INC="`$PG_CONFIG --includedir`"
|
2003-09-27 21:30:26 +00:00
|
|
|
AC_MSG_CHECKING([for postgreSQL libs])
|
|
|
|
AC_MSG_RESULT([$PG_LIB])
|
2004-03-05 23:30:29 +00:00
|
|
|
AC_DEFINE([HAVE_POSTGRESQL],1,
|
|
|
|
[Define to 1 if PostgreSQL is available])
|
2004-02-29 00:52:20 +00:00
|
|
|
ac_postgresql="yes"
|
2004-02-10 03:56:45 +00:00
|
|
|
else
|
2004-02-29 00:52:20 +00:00
|
|
|
ac_postgresql="no"
|
2003-09-19 02:56:45 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(PG_INC)
|
|
|
|
AC_SUBST(PG_LIB)
|
|
|
|
|
2004-03-05 23:30:29 +00:00
|
|
|
AM_CONDITIONAL([HAVE_POSTGRESQL], [test "$ac_postgresql" = "yes"])
|
2004-02-10 03:56:45 +00:00
|
|
|
|
|
|
|
|
2004-02-15 12:23:30 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl checking if gdal and/or postgresql are available
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
if test x"$ac_postgresql" = "xno" -a x"$ac_gdalogr" = "xno"; then
|
2004-02-29 00:52:20 +00:00
|
|
|
AC_MSG_ERROR("QGIS without GDAL(with OGR support) and PostgreSQL makes no sense!")
|
2004-02-15 12:23:30 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2003-09-19 02:56:45 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2004-01-19 18:06:01 +00:00
|
|
|
dnl SPIT plugin
|
2003-09-19 02:56:45 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2004-02-10 03:56:45 +00:00
|
|
|
AC_ARG_ENABLE(spit,
|
|
|
|
AC_HELP_STRING([--disable-spit],
|
|
|
|
[disable Shapefile to PostgreSQL (PostGIS) import plugin (built by default with PostgreSQL support)]),
|
2004-02-29 00:52:20 +00:00
|
|
|
[ac_spit=$enableval], [ac_spit=yes])
|
2004-01-19 18:06:01 +00:00
|
|
|
|
2004-02-10 03:56:45 +00:00
|
|
|
AC_MSG_CHECKING([for SPIT])
|
|
|
|
if test x"$ac_spit" = "xyes"; then
|
2004-02-29 00:52:20 +00:00
|
|
|
if test x"$ac_postgresql" = "xyes" -a x"$ac_gdalogr" = "xyes"; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
ac_spit="no"
|
|
|
|
if test x"$ac_postgresql" = "xno" ; then
|
|
|
|
AC_MSG_RESULT([no (PostgreSQL not available)])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no (GDAL with OGR support not available)])
|
|
|
|
fi
|
|
|
|
fi
|
2004-01-19 18:06:01 +00:00
|
|
|
else
|
2003-09-19 02:56:45 +00:00
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
2004-01-19 18:06:01 +00:00
|
|
|
|
2004-02-11 06:20:13 +00:00
|
|
|
AM_CONDITIONAL([HAVE_SPIT], [test "$ac_spit" = "yes"])
|
2004-01-19 18:06:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2004-03-26 17:42:11 +00:00
|
|
|
dnl GRASS package
|
2004-01-19 18:06:01 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2004-03-26 17:42:11 +00:00
|
|
|
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)]))
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for 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()
|
|
|
|
GISLIB=`ls $with_grass/lib/libgrass_gis.*`
|
|
|
|
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"
|
|
|
|
|
|
|
|
GISINC=`ls $with_grass/include/gis.h`
|
|
|
|
if test ! -f "$GISINC"; then
|
|
|
|
AC_MSG_ERROR( [GRASS headers not found] )
|
|
|
|
fi
|
|
|
|
|
|
|
|
GRASS_INC="$with_grass/include/"
|
|
|
|
HAVE_GRASS=1
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
ac_grass="yes"
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
ac_grass="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(HAVE_GRASS)
|
|
|
|
AC_SUBST(GRASS_LIB)
|
|
|
|
AC_SUBST(GRASS_INC)
|
|
|
|
AM_CONDITIONAL([HAVE_GRASS], [test "$ac_grass" = "yes"])
|
|
|
|
|
2004-01-19 18:06:01 +00:00
|
|
|
|
2004-02-10 03:56:45 +00:00
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Debugging
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE(debug,
|
2004-02-29 00:52:20 +00:00
|
|
|
AC_HELP_STRING([--enable-debug],
|
|
|
|
[Enable debuging messages [[default=no]]]),
|
2004-02-10 03:56:45 +00:00
|
|
|
[ac_debug=$enableval], [ac_debug=no])
|
|
|
|
|
2004-02-07 19:06:35 +00:00
|
|
|
AC_MSG_CHECKING([if debug statements should be sent to stdout/stderr])
|
2004-02-10 03:56:45 +00:00
|
|
|
if test x"$ac_debug" = "xno" ; then
|
2004-02-29 00:52:20 +00:00
|
|
|
DEBUG_QGIS=-DNO_DEBUG
|
|
|
|
AC_MSG_RESULT([no])
|
2004-02-02 00:59:32 +00:00
|
|
|
else
|
2004-02-29 00:52:20 +00:00
|
|
|
DEBUG_QGIS=-DQGISDEBUG
|
|
|
|
AC_MSG_RESULT([yes])
|
2004-02-02 00:59:32 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(DEBUG_QGIS)
|
|
|
|
|
2004-02-10 03:56:45 +00:00
|
|
|
|
2004-01-27 06:09:44 +00:00
|
|
|
#echo ${prefix}/lib
|
2004-02-11 06:20:13 +00:00
|
|
|
#ac_libdir=${prefix}/lib/$PACKAGE
|
|
|
|
#AC_MSG_CHECKING([plugin install directory])
|
|
|
|
#AC_MSG_RESULT([$libdir])
|
2004-01-27 06:09:44 +00:00
|
|
|
#echo Plugins will be installed in $libdir
|
2004-02-10 03:56:45 +00:00
|
|
|
|
2003-09-27 21:30:26 +00:00
|
|
|
AC_CONFIG_FILES([
|
2004-02-29 00:52:20 +00:00
|
|
|
Makefile
|
|
|
|
src/Makefile
|
2004-04-22 08:10:41 +00:00
|
|
|
src/svg/Makefile
|
|
|
|
src/svg/biology/Makefile
|
|
|
|
src/svg/geometric/Makefile
|
|
|
|
src/svg/icon/Makefile
|
2004-05-05 16:51:58 +00:00
|
|
|
src/svg/north_arrows/Makefile
|
2004-04-22 08:10:41 +00:00
|
|
|
src/svg/symbol/Makefile
|
2004-05-09 12:38:40 +00:00
|
|
|
src/images/Makefile
|
|
|
|
src/images/north_arrows/Makefile
|
2004-05-20 07:27:36 +00:00
|
|
|
src/images/splash/Makefile
|
2004-05-20 10:38:22 +00:00
|
|
|
src/images/icons/Makefile
|
2004-06-30 11:30:40 +00:00
|
|
|
src/themes/Makefile
|
|
|
|
src/themes/default/Makefile
|
2004-02-29 00:52:20 +00:00
|
|
|
providers/Makefile
|
|
|
|
providers/ogr/Makefile
|
|
|
|
providers/postgres/Makefile
|
|
|
|
providers/delimitedtext/Makefile
|
2004-03-26 17:42:11 +00:00
|
|
|
providers/grass/Makefile
|
2004-05-07 18:44:20 +00:00
|
|
|
providers/gpx/Makefile
|
2004-02-29 00:52:20 +00:00
|
|
|
plugins/Makefile
|
|
|
|
plugins/spit/Makefile
|
|
|
|
plugins/example/Makefile
|
|
|
|
plugins/maplayer/Makefile
|
|
|
|
plugins/geoprocessing/Makefile
|
2004-03-22 23:59:11 +00:00
|
|
|
plugins/gps_importer/Makefile
|
2004-04-06 08:54:19 +00:00
|
|
|
plugins/grid_maker/Makefile
|
2004-03-26 17:42:11 +00:00
|
|
|
plugins/grass/Makefile
|
2004-02-29 00:52:20 +00:00
|
|
|
doc/Makefile
|
|
|
|
doc/skin/Makefile
|
|
|
|
doc/skin/images/Makefile
|
|
|
|
doc/images/Makefile
|
|
|
|
doc/plugins/Makefile
|
|
|
|
doc/plugins/geoprocessing/Makefile
|
|
|
|
doc/plugins/geoprocessing/buffer/Makefile
|
2004-03-12 16:44:41 +00:00
|
|
|
doc/plugins/delimited_text/Makefile
|
2004-02-29 00:52:20 +00:00
|
|
|
qgis.spec
|
2004-03-26 11:10:51 +00:00
|
|
|
plugins/delimited_text/Makefile
|
2004-03-30 22:23:08 +00:00
|
|
|
tools/Makefile
|
2004-03-23 06:21:15 +00:00
|
|
|
tools/qgis_config/Makefile
|
2004-04-17 22:07:13 +00:00
|
|
|
i18n/Makefile
|
2004-05-05 09:32:36 +00:00
|
|
|
plugins/north_arrow/Makefile
|
|
|
|
plugins/copyright_label/Makefile
|
2004-06-09 16:03:02 +00:00
|
|
|
plugins/scale_bar/Makefile
|
2003-09-19 02:56:45 +00:00
|
|
|
])
|
|
|
|
|
2004-01-19 18:06:01 +00:00
|
|
|
AC_OUTPUT
|
2004-02-10 03:56:45 +00:00
|
|
|
|
|
|
|
dnl Output the configuration summary
|
|
|
|
echo ""
|
|
|
|
echo "=========================================="
|
|
|
|
echo "$PACKAGE $VERSION"
|
|
|
|
echo "------------------------------------------"
|
2004-02-15 12:23:30 +00:00
|
|
|
echo "GDAL/OGR : $ac_gdalogr"
|
2004-02-10 03:56:45 +00:00
|
|
|
echo "PostgreSQL : $ac_postgresql"
|
2004-03-26 17:42:11 +00:00
|
|
|
echo "GRASS : $ac_grass"
|
2004-02-10 03:56:45 +00:00
|
|
|
echo "SPIT : $ac_spit"
|
|
|
|
echo ""
|
|
|
|
echo "Debug : $ac_debug"
|
2004-03-26 11:10:51 +00:00
|
|
|
echo "Plugin dir : ${libdir}/$PACKAGE"
|
2004-02-10 03:56:45 +00:00
|
|
|
echo ""
|
|
|
|
echo "The binary will be installed in $prefix/bin"
|
|
|
|
echo "------------------------------------------"
|
|
|
|
echo "Configure finished, type 'make' to build."
|