mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
92 lines
2.2 KiB
Plaintext
92 lines
2.2 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(configure.in)
|
|
AM_INIT_AUTOMAKE(spit, 0.0.1)
|
|
AC_PROG_LIBTOOL()
|
|
#AC_CONFIG_HEADERS()
|
|
AM_MAINTAINER_MODE()
|
|
gw_CHECK_QT
|
|
dnl ---------------------------------------------------------------------------
|
|
dnl GDAL/OGR
|
|
dnl ---------------------------------------------------------------------------
|
|
AC_ARG_WITH(gdal,
|
|
[ --with-gdal=path/gdal-config Full path to 'gdal-config' script,
|
|
e.g. '--with-gdal=/usr/local/bin/gdal-config'
|
|
],
|
|
[ if test -f "$with_gdal" ; then
|
|
GDAL_CONFIG="$with_gdal"
|
|
else
|
|
AC_MSG_ERROR("Cannot find $with_gdal")
|
|
fi
|
|
],
|
|
[
|
|
GDAL_CONFIG=`which gdal-config`
|
|
if test ! -f "$GDAL_CONFIG" ; then
|
|
AC_MSG_ERROR(["Cannot find gdal-config, try to use --with-gdal option"])
|
|
fi
|
|
]
|
|
)
|
|
|
|
AC_MSG_CHECKING([for GDAL/OGR])
|
|
if test ! -x "$GDAL_CONFIG" ; then
|
|
AC_MSG_ERROR([Cannot execute gdal-config, check permissions])
|
|
fi
|
|
|
|
if test `$GDAL_CONFIG --ogr-enabled` = "no" ; then
|
|
AC_MSG_ERROR([GDAL is compiled without OGR support.])
|
|
fi
|
|
AC_MSG_RESULT(yes)
|
|
AC_MSG_CHECKING([for GDAL libs])
|
|
GDAL_LIB="`$GDAL_CONFIG --libs`"
|
|
AC_MSG_RESULT([$GDAL_LIB])
|
|
GDAL_CFLAGS="`$GDAL_CONFIG --prefix`/include"
|
|
|
|
|
|
AC_SUBST(GDAL_LIB)
|
|
AC_SUBST(GDAL_CFLAGS)
|
|
|
|
dnl ---------------------------------------------------------------------------
|
|
dnl PostgreSQL
|
|
dnl ---------------------------------------------------------------------------
|
|
PG_CONFIG=no
|
|
|
|
AC_ARG_WITH(pg,[ --with-pg=path/pg_config PostgreSQL (PostGIS) Support
|
|
(full path to pg_config)],,)
|
|
|
|
if test "$with_pg" = "yes" -o "$with_pg" = "" ; then
|
|
AC_PATH_PROG(PG_CONFIG, pg_config, no)
|
|
else
|
|
PG_CONFIG=$with_pg
|
|
fi
|
|
|
|
AC_MSG_CHECKING([for PostgreSQL])
|
|
|
|
if test "$PG_CONFIG" = "no" ; then
|
|
PG_LIB=
|
|
PG_INC=
|
|
|
|
AC_MSG_RESULT([no])
|
|
else
|
|
HAVE_PG=1
|
|
PG_LIB="-L`$PG_CONFIG --libdir` -lpq"
|
|
PG_INC="`$PG_CONFIG --includedir`"
|
|
AC_MSG_RESULT([yes])
|
|
AC_MSG_CHECKING([for postgreSQL libs])
|
|
AC_MSG_RESULT([$PG_LIB])
|
|
fi
|
|
|
|
AC_SUBST(HAVE_PG)
|
|
AC_SUBST(PG_INC)
|
|
AC_SUBST(PG_LIB)
|
|
|
|
AM_CONDITIONAL(POSTGRESDB, test x$HAVE_PG = x1)
|
|
dnl *** Autoconf output *****************************
|
|
AC_CONFIG_FILES([
|
|
Makefile
|
|
])
|
|
AC_OUTPUT
|
|
#AC_OUTPUT([
|
|
#src/platform.pro
|
|
#])
|
|
|