2003-09-19 02:56:45 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2005-11-12 03:37:11 +00:00
|
|
|
dnl $Id$
|
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
|
2005-06-11 15:01:43 +00:00
|
|
|
dnl Note the convention here is to name development versions with a base
|
|
|
|
dnl name of the last release, the word "devel", and an EXTRA_VERSION
|
|
|
|
dnl number. This means that development work on 0.8 will be versioned as
|
|
|
|
dnl 0.7devel1, 0.7devel2, etc.
|
2004-02-27 05:39:23 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
MAJOR_VERSION=0
|
2006-03-17 14:52:26 +00:00
|
|
|
MINOR_VERSION=8
|
|
|
|
MICRO_VERSION=0
|
|
|
|
EXTRA_VERSION=0
|
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
|
2006-03-17 14:52:26 +00:00
|
|
|
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}-Preview-${EXTRA_VERSION}
|
2004-02-27 05:39:23 +00:00
|
|
|
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 ---------------------------------------------------------------------------
|
2006-11-16 02:26:02 +00:00
|
|
|
INTERFACE_VERSION=1:0:0
|
2004-06-30 11:30:40 +00:00
|
|
|
|
|
|
|
|
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])
|
|
|
|
|
|
|
|
|
2005-03-13 14:24:48 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl check lib64 environment
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AQ_CHECK_LIB64
|
|
|
|
|
2006-09-15 09:25:08 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl svnversion check
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_CHECK_PROG(HAVE_SVNVERSION, [svnversion], [yes], [no])
|
2005-03-13 14:24:48 +00:00
|
|
|
|
2004-02-27 05:39:23 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Qt check
|
|
|
|
dnl ---------------------------------------------------------------------------
|
2006-03-12 10:14:03 +00:00
|
|
|
AQ_CHECK_QT4
|
2004-01-19 18:06:01 +00:00
|
|
|
|
2005-11-12 01:10:00 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Python
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AX_PYTHON
|
|
|
|
|
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
|
|
|
|
2004-10-19 05:03:44 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl GEOS
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AQ_CHECK_GEOS
|
|
|
|
if test x"$ac_geos" = "xno"; then
|
|
|
|
AC_MSG_ERROR("GEOS is required and was not found")
|
|
|
|
fi
|
2004-01-19 18:06:01 +00:00
|
|
|
|
2005-04-21 04:06:58 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl PROJ
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_ARG_WITH(projdir,
|
|
|
|
AC_HELP_STRING([--with-projdir=DIR],
|
|
|
|
[ Proj4 installation directory, e.g. '--with-projdir=/usr/local']),
|
|
|
|
[
|
2006-08-21 09:20:41 +00:00
|
|
|
if test x"$with_projlibdir" = "x" ; then
|
|
|
|
AC_MSG_CHECKING([for Proj4 library in $with_projdir/lib])
|
|
|
|
PROJ_LIB="-L$with_projdir/lib -lproj"
|
|
|
|
if test -d "$with_projdir/lib" ; then
|
|
|
|
projlibdir="$with_projdir/lib"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_CHECKING([for Proj4 library in $with_projlibdir])
|
|
|
|
PROJ_LIB="-L$with_projlibdir -lproj"
|
|
|
|
if test -d "$with_projlibdir" ; then
|
|
|
|
projlibdir="$with_projlibdir"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x"$projlibdir" = "x" ; then
|
|
|
|
AC_MSG_ERROR([*** directory $projlibdir does not exist.])
|
|
|
|
else
|
|
|
|
LDFLAGS="$LDFLAGS $PROJ_LIB"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$with_projdir/include"
|
|
|
|
AC_MSG_RESULT(["$with_projdir exists"])
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(proj_api.h,
|
|
|
|
[PROJ_INC="-I$with_projdir/include"],
|
|
|
|
[AC_MSG_ERROR([*** Proj4 headers not found.])])
|
|
|
|
|
|
|
|
AC_CHECK_LIB(proj,pj_is_latlong,
|
|
|
|
[have_proj_lib=yes],
|
|
|
|
[AC_MSG_ERROR([*** Proj4 library not found.])])
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
|
2005-04-21 04:06:58 +00:00
|
|
|
[
|
2006-08-21 09:20:41 +00:00
|
|
|
AC_CHECK_HEADERS(proj_api.h,[PROJ_INC=""],
|
|
|
|
[AC_MSG_ERROR([*** Proj4 headers not found.])])
|
|
|
|
]
|
2005-04-22 17:05:00 +00:00
|
|
|
AC_CHECK_LIB(proj,pj_is_latlong,
|
2006-08-21 09:20:41 +00:00
|
|
|
[
|
|
|
|
have_proj_lib=yes
|
|
|
|
PROJ_LIB="-lproj"
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_MSG_ERROR([Proj4 is required and was not found.])
|
|
|
|
])
|
|
|
|
)
|
|
|
|
|
|
|
|
dnl A dummy section that's here just to produce some text for the
|
|
|
|
dnl configure --help output. The actual use of projlibdir is in
|
|
|
|
dnl the AC_ARG_WITH(projdir) macro
|
|
|
|
|
|
|
|
AC_ARG_WITH(projlibdir,AC_HELP_STRING([--with-projlibdir=DIR],
|
|
|
|
[ Proj4 library directory, optional, use when library is in a different directory to that derived by appending /lib to --with-projdir ]),[],[])
|
2005-04-21 04:06:58 +00:00
|
|
|
|
|
|
|
AC_SUBST(PROJ_INC)
|
|
|
|
AC_SUBST(PROJ_LIB)
|
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl SQLITE
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_ARG_WITH(sqlite3dir,
|
|
|
|
AC_HELP_STRING([--with-sqlite3dir=DIR],
|
|
|
|
[ sqlite3 installation directory, e.g. '--with-sqlite3=/usr/local']),
|
|
|
|
[
|
|
|
|
AC_MSG_CHECKING([for Sqlite3 library in $with_sqlite3dir])
|
|
|
|
if test -d "$with_sqlite3dir/lib"; then
|
|
|
|
LDFLAGS="$LDFLAGS -L$with_sqlite3dir/lib"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$with_sqlite3dir/include"
|
|
|
|
AC_MSG_RESULT(["$with_sqlite3dir exists"])
|
2005-04-22 17:05:00 +00:00
|
|
|
AC_CHECK_HEADERS(sqlite3.h,
|
|
|
|
[SQLITE3_INC="-I$with_sqlite3dir/include"],
|
|
|
|
[
|
|
|
|
AC_MSG_ERROR([*** Sqlite3 headers not found.])
|
|
|
|
])
|
|
|
|
AC_CHECK_LIB(sqlite3,sqlite3_open,
|
2005-04-21 04:06:58 +00:00
|
|
|
[
|
|
|
|
have_sqlite3_lib=yes
|
|
|
|
SQLITE3_LIB="-L$with_sqlite3dir/lib -lsqlite3"
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_MSG_ERROR([*** Sqlite3 library not found.])
|
|
|
|
])
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([*** directory $with_sqlite3dir does not exist.])
|
|
|
|
fi
|
|
|
|
],
|
2005-04-22 17:05:00 +00:00
|
|
|
[
|
|
|
|
AC_CHECK_HEADERS(sqlite3.h,[SQLITE3_INC=""],
|
|
|
|
[
|
|
|
|
AC_MSG_ERROR([*** Sqlite3 headers not found.])
|
|
|
|
])
|
|
|
|
AC_CHECK_LIB(sqlite3,sqlite3_open,
|
2005-04-21 04:06:58 +00:00
|
|
|
[
|
|
|
|
have_sqlite3_lib=yes
|
|
|
|
SQLITE3_LIB="-lsqlite3"
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_MSG_ERROR([*** Sqlite3 library not found.])
|
|
|
|
])
|
|
|
|
|
2005-04-22 17:05:00 +00:00
|
|
|
|
2005-04-21 04:06:58 +00:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_SUBST(SQLITE3_INC)
|
|
|
|
AC_SUBST(SQLITE3_LIB)
|
|
|
|
|
|
|
|
|
|
|
|
|
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])
|
2003-09-19 02:56:45 +00:00
|
|
|
|
2006-02-15 09:58:23 +00:00
|
|
|
# pg_config cannot be used with cross compiler
|
|
|
|
# we expect that libs and header files are in standard dirs
|
|
|
|
case "${host}" in
|
|
|
|
*-mingw*)
|
|
|
|
if test x"$with_postgresql" = "xyes" -o x"$with_postgresql" = "x" ; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
PG_LIB="-lpq"
|
|
|
|
PG_INC=""
|
|
|
|
AC_DEFINE([HAVE_POSTGRESQL],1,
|
|
|
|
[Define to 1 if PostgreSQL is available])
|
|
|
|
ac_postgresql="yes"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
if test x"$with_postgresql" = "xyes" -o x"$with_postgresql" = "x" ; then
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
AC_PATH_PROG([PG_CONFIG], [pg_config], [no])
|
|
|
|
elif test x"$with_postgresql" = "xno" ; then
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
PG_CONFIG=no
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
PG_CONFIG="$with_postgresql/pg_config"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x"$PG_CONFIG" != "xno" ; then
|
|
|
|
PG_LIB="-L`$PG_CONFIG --libdir` -lpq"
|
|
|
|
PG_INC="-I`$PG_CONFIG --includedir`"
|
|
|
|
AC_MSG_CHECKING([for postgreSQL libs])
|
|
|
|
AC_MSG_RESULT([$PG_LIB])
|
|
|
|
AC_DEFINE([HAVE_POSTGRESQL],1,
|
|
|
|
[Define to 1 if PostgreSQL is available])
|
|
|
|
ac_postgresql="yes"
|
|
|
|
ac_postgresql_version=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
|
|
|
|
postgresql_version_string="(Version $ac_postgresql_version)"
|
|
|
|
else
|
|
|
|
ac_postgresql="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2003-09-19 02:56:45 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2005-09-10 10:34:05 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl support for lex/yacc tools - for search strings parser
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_PROG_YACC
|
|
|
|
AM_PROG_LEX
|
|
|
|
|
2006-11-17 10:05:32 +00:00
|
|
|
# test whether they have been really found
|
|
|
|
# (by default if not found autoconf will use a stub)
|
|
|
|
|
|
|
|
if test x"$LEX" != "xflex" -a x"$LEX" != "xlex" ; then
|
|
|
|
AC_MSG_ERROR("Lex/Flex is not available!")
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x"$YACC" != "xbison" -a x"$YACC" != "xyacc" -a x"$YACC" != "xbison -y" ; then
|
|
|
|
AC_MSG_ERROR("Yacc/Bison is not available!")
|
|
|
|
fi
|
2005-09-10 10:34:05 +00:00
|
|
|
|
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 ---------------------------------------------------------------------------
|
2005-10-13 16:40:29 +00:00
|
|
|
AC_CHECK_LIB(util, openpty)
|
|
|
|
|
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()
|
2004-12-20 07:13:35 +00:00
|
|
|
if test ! -f "$GISLIB"; then
|
2005-03-13 14:24:48 +00:00
|
|
|
GISLIB=`ls $with_grass/${_lib}/libgrass_gis.dylib 2> /dev/null`
|
2004-12-20 07:13:35 +00:00
|
|
|
fi
|
2004-11-26 20:31:49 +00:00
|
|
|
if test ! -f "$GISLIB"; then
|
2005-03-13 14:24:48 +00:00
|
|
|
GISLIB=`ls $with_grass/${_lib}/libgrass_gis.so 2> /dev/null`
|
2004-11-26 20:31:49 +00:00
|
|
|
fi
|
|
|
|
if test ! -f "$GISLIB"; then
|
2005-03-13 14:24:48 +00:00
|
|
|
GISLIB=`ls $with_grass/${_lib}/libgrass_gis.a 2> /dev/null`
|
2004-11-26 20:31:49 +00:00
|
|
|
fi
|
2006-01-11 16:34:40 +00:00
|
|
|
if test ! -f "$GISLIB"; then
|
|
|
|
GISLIB=`ls $with_grass/${_lib}/grass_gis.dll 2> /dev/null`
|
|
|
|
fi
|
2004-11-26 20:31:49 +00:00
|
|
|
|
2004-03-26 17:42:11 +00:00
|
|
|
if test ! -f "$GISLIB"; then
|
2005-05-13 21:39:20 +00:00
|
|
|
AC_MSG_ERROR( [GRASS library not found in $with_grass/${_lib}] )
|
2004-03-26 17:42:11 +00:00
|
|
|
fi
|
2005-03-13 14:24:48 +00:00
|
|
|
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"
|
2004-03-26 17:42:11 +00:00
|
|
|
|
2005-10-13 16:40:29 +00:00
|
|
|
if test "$ac_cv_lib_util_openpty" = yes; then
|
|
|
|
HAVE_OPENPTY=1
|
|
|
|
GRASS_LIB="$GRASS_LIB -lutil"
|
|
|
|
fi
|
|
|
|
|
2006-02-14 10:42:47 +00:00
|
|
|
GISINC=`ls $with_grass/include/grass/gis.h`
|
2004-03-26 17:42:11 +00:00
|
|
|
if test ! -f "$GISINC"; then
|
2005-04-21 04:06:58 +00:00
|
|
|
AC_MSG_ERROR( [GRASS headers not found] )
|
2004-03-26 17:42:11 +00:00
|
|
|
fi
|
|
|
|
|
2005-02-03 05:54:43 +00:00
|
|
|
GRASS_BASE="$with_grass"
|
2004-03-26 17:42:11 +00:00
|
|
|
GRASS_INC="$with_grass/include/"
|
|
|
|
HAVE_GRASS=1
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
ac_grass="yes"
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
ac_grass="no"
|
|
|
|
fi
|
|
|
|
|
2005-02-03 05:54:43 +00:00
|
|
|
AC_SUBST(GRASS_BASE)
|
2004-03-26 17:42:11 +00:00
|
|
|
AC_SUBST(HAVE_GRASS)
|
2005-10-13 16:40:29 +00:00
|
|
|
AC_SUBST(HAVE_OPENPTY)
|
2004-03-26 17:42:11 +00:00
|
|
|
AC_SUBST(GRASS_LIB)
|
|
|
|
AC_SUBST(GRASS_INC)
|
|
|
|
AM_CONDITIONAL([HAVE_GRASS], [test "$ac_grass" = "yes"])
|
|
|
|
|
2005-03-01 17:54:32 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl GPX and GPS plugins
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE(gpx,
|
|
|
|
AC_HELP_STRING([--disable-gpx],
|
|
|
|
[Disable the GPX provider and the GPS plugin (built by default if libexpat is found)]),
|
|
|
|
[ac_gpx=$enableval], [ac_gpx=yes])
|
2005-05-13 21:39:20 +00:00
|
|
|
AC_MSG_CHECKING([GPX provider and GPS plugin should be installed (default: yes)])
|
|
|
|
AC_MSG_RESULT([$ac_gpx])
|
2005-03-01 17:54:32 +00:00
|
|
|
have_expat_lib=no
|
|
|
|
if [ test $ac_gpx = yes ] ; then
|
|
|
|
AC_CHECK_LIB(expat, XML_ParserCreate, have_expat_lib=yes)
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL([HAVE_EXPAT], [test "$have_expat_lib" = "yes"])
|
|
|
|
|
2005-05-13 21:39:20 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2006-04-18 08:58:48 +00:00
|
|
|
dnl unittests
|
2005-05-13 21:39:20 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
2006-04-18 08:58:48 +00:00
|
|
|
AC_ARG_ENABLE(unittests,
|
|
|
|
AC_HELP_STRING([--enable-unittests],
|
|
|
|
[Enable the compilation of unittests]),
|
2005-05-13 21:39:20 +00:00
|
|
|
[ac_com=yes], [ac_com=no])
|
2006-04-18 08:58:48 +00:00
|
|
|
AC_MSG_CHECKING([Whether to build unit tests])
|
2005-05-13 21:39:20 +00:00
|
|
|
AC_MSG_RESULT([$ac_com])
|
2006-04-18 08:58:48 +00:00
|
|
|
AM_CONDITIONAL([WITH_UNITTESTS], [test "$ac_com" = "yes"])
|
2004-02-10 03:56:45 +00:00
|
|
|
|
2005-05-15 23:56:33 +00:00
|
|
|
|
2005-05-14 00:48:16 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl Georeferencing plugin
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE(georef,
|
|
|
|
AC_HELP_STRING([--disable-georef],
|
|
|
|
[Disable the georeferencing plugin (built by default if libgsl is found)]),
|
|
|
|
[ac_georef=$enableval], [ac_georef=yes])
|
2005-05-15 23:56:33 +00:00
|
|
|
ac_gsl=no
|
|
|
|
AC_MSG_CHECKING([if the georeferencer plugin should be built])
|
|
|
|
AC_MSG_RESULT($ac_georef)
|
2005-05-14 00:48:16 +00:00
|
|
|
if [ test $ac_georef = yes ] ; then
|
2005-05-15 23:56:33 +00:00
|
|
|
AM_PATH_GSL(1.5.9, [ac_gsl=yes], [ac_gsl=no])
|
2005-05-14 00:48:16 +00:00
|
|
|
fi
|
2005-05-15 23:56:33 +00:00
|
|
|
AM_CONDITIONAL([HAVE_GSL], [test "$ac_gsl" = "yes"])
|
2005-05-14 00:48:16 +00:00
|
|
|
|
|
|
|
|
2006-10-02 09:34:55 +00:00
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
dnl WFS plugin
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING([for WFS])
|
|
|
|
|
|
|
|
if test -n "$with_wfs" -a x"$with_wfs" != "xno"; then
|
|
|
|
ac_wfs=yes
|
|
|
|
AC_DEFINE([HAVE_WFS],1,
|
|
|
|
[Define to 1 if wfs plugin/provider is requested])
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
else
|
|
|
|
ac_wfs=no
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL([HAVE_WFS], [test "$ac_wfs" = "yes"])
|
|
|
|
|
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
|
2006-01-12 15:41:29 +00:00
|
|
|
Makefile.win.rules
|
2006-09-30 06:22:55 +00:00
|
|
|
create_qm_files.sh
|
2006-01-07 02:25:11 +00:00
|
|
|
doc/Makefile
|
|
|
|
doc/images/Makefile
|
|
|
|
doc/install_guide/Makefile
|
|
|
|
doc/plugins/delimited_text/Makefile
|
|
|
|
doc/plugins/geoprocessing/buffer/Makefile
|
|
|
|
doc/plugins/geoprocessing/Makefile
|
|
|
|
doc/plugins/Makefile
|
|
|
|
i18n/Makefile
|
|
|
|
images/Makefile
|
|
|
|
images/developers/Makefile
|
|
|
|
images/icons/Makefile
|
|
|
|
images/north_arrows/Makefile
|
|
|
|
images/splash/Makefile
|
|
|
|
images/svg/biology/Makefile
|
|
|
|
images/svg/geometric/Makefile
|
|
|
|
images/svg/gpsicons/Makefile
|
|
|
|
images/svg/icon/Makefile
|
|
|
|
images/svg/Makefile
|
|
|
|
images/svg/north_arrows/Makefile
|
|
|
|
images/svg/symbol/Makefile
|
2006-01-24 02:41:54 +00:00
|
|
|
images/svg/sport/Makefile
|
2006-01-07 02:25:11 +00:00
|
|
|
images/themes/default/Makefile
|
|
|
|
images/themes/Makefile
|
|
|
|
images/themes/nkids/Makefile
|
|
|
|
resources/Makefile
|
2006-11-16 02:26:02 +00:00
|
|
|
resources/context_help/Makefile
|
2006-01-07 02:25:11 +00:00
|
|
|
src/Makefile
|
|
|
|
src/composer/Makefile
|
2006-01-08 01:36:35 +00:00
|
|
|
src/core/Makefile
|
|
|
|
src/designer/Makefile
|
2006-01-09 01:20:08 +00:00
|
|
|
src/helpviewer/Makefile
|
2006-01-08 23:18:32 +00:00
|
|
|
src/gui/Makefile
|
2006-01-07 02:25:11 +00:00
|
|
|
src/legend/Makefile
|
|
|
|
src/mac/Contents/Makefile
|
|
|
|
src/mac/Contents/Resources/Makefile
|
|
|
|
src/mac/Makefile
|
2006-01-09 00:35:09 +00:00
|
|
|
src/plugins/Makefile
|
|
|
|
src/plugins/copyright_label/Makefile
|
|
|
|
src/plugins/delimited_text/Makefile
|
|
|
|
src/plugins/geoprocessing/Makefile
|
|
|
|
src/plugins/georeferencer/Makefile
|
|
|
|
src/plugins/gps_importer/Makefile
|
|
|
|
src/plugins/grass/config/Makefile
|
|
|
|
src/plugins/grass/Makefile
|
|
|
|
src/plugins/grass/modules/Makefile
|
|
|
|
src/plugins/grass/themes/default/Makefile
|
|
|
|
src/plugins/grass/themes/Makefile
|
|
|
|
src/plugins/grid_maker/Makefile
|
|
|
|
src/plugins/maplayer/Makefile
|
|
|
|
src/plugins/north_arrow/Makefile
|
|
|
|
src/plugins/scale_bar/Makefile
|
|
|
|
src/plugins/spit/Makefile
|
2006-09-01 08:55:56 +00:00
|
|
|
src/plugins/wfs/Makefile
|
2006-01-08 19:53:28 +00:00
|
|
|
src/providers/Makefile
|
|
|
|
src/providers/delimitedtext/Makefile
|
|
|
|
src/providers/gpx/Makefile
|
|
|
|
src/providers/grass/Makefile
|
|
|
|
src/providers/ogr/Makefile
|
|
|
|
src/providers/postgres/Makefile
|
|
|
|
src/providers/wms/Makefile
|
2006-09-01 08:55:56 +00:00
|
|
|
src/providers/wfs/Makefile
|
2006-01-08 23:18:32 +00:00
|
|
|
src/raster/Makefile
|
|
|
|
src/ui/Makefile
|
|
|
|
src/widgets/Makefile
|
|
|
|
src/widgets/projectionselector/Makefile
|
2004-03-30 22:23:08 +00:00
|
|
|
tools/Makefile
|
2005-11-12 03:37:11 +00:00
|
|
|
tools/mapserver_export/Makefile
|
2006-01-07 02:25:11 +00:00
|
|
|
tools/qgis_config/Makefile
|
2006-04-03 13:31:35 +00:00
|
|
|
tests/Makefile
|
|
|
|
tests/src/Makefile
|
|
|
|
tests/src/core/Makefile
|
2006-04-10 22:43:36 +00:00
|
|
|
tests/src/gui/Makefile
|
2006-04-11 10:11:49 +00:00
|
|
|
tests/src/raster/Makefile
|
2005-05-13 21:39:20 +00:00
|
|
|
qgis.spec
|
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-10-25 20:44:53 +00:00
|
|
|
echo "GDAL/OGR : $ac_gdalogr (Version $ac_gdalogr_version)"
|
|
|
|
echo "GEOS : $ac_geos (Version $ac_geos_version)"
|
2004-12-20 07:13:35 +00:00
|
|
|
echo "PostgreSQL : $ac_postgresql $postgresql_version_string"
|
2004-03-26 17:42:11 +00:00
|
|
|
echo "GRASS : $ac_grass"
|
2004-02-10 03:56:45 +00:00
|
|
|
echo "SPIT : $ac_spit"
|
2005-05-15 23:56:33 +00:00
|
|
|
echo "Georeferencer : $ac_gsl"
|
2006-10-02 09:34:55 +00:00
|
|
|
echo "WFS : $ac_wfs"
|
2005-03-01 17:54:32 +00:00
|
|
|
echo "GPS/GPX : $have_expat_lib"
|
2005-04-21 04:06:58 +00:00
|
|
|
echo "PROJ4 : $have_proj_lib"
|
|
|
|
echo "SQLITE3 : $have_sqlite3_lib"
|
2005-11-12 03:37:11 +00:00
|
|
|
echo "Python : $ac_use_python"
|
2004-02-10 03:56:45 +00:00
|
|
|
echo ""
|
2006-08-07 07:52:42 +00:00
|
|
|
echo "CPPFLAGS : $CPPFLAGS"
|
|
|
|
echo "CXXFLAGS : $CXXFLAGS"
|
|
|
|
echo ""
|
2004-02-10 03:56:45 +00:00
|
|
|
echo "Debug : $ac_debug"
|
2006-08-21 09:20:41 +00:00
|
|
|
echo "Plugin dir : ${prefix}/lib/$PACKAGE"
|
2004-02-10 03:56:45 +00:00
|
|
|
echo ""
|
2005-07-03 00:18:14 +00:00
|
|
|
if test "$have_qtmac" = "yes"; then
|
|
|
|
echo "The binary will be installed in $prefix"
|
|
|
|
else
|
|
|
|
echo "The binary will be installed in $prefix/bin"
|
|
|
|
fi
|
2005-03-25 18:59:43 +00:00
|
|
|
echo ""
|
|
|
|
echo "The build is using Qt in $QTDIR"
|
2005-10-06 02:24:35 +00:00
|
|
|
echo "Linking with Qt using $QT_LIBS"
|
2004-02-10 03:56:45 +00:00
|
|
|
echo "------------------------------------------"
|
2005-05-13 21:39:20 +00:00
|
|
|
echo "Configure finished, type 'make' to build."
|