m4_define(major, 1) m4_define(minor, 9) m4_define(micro, 102) AC_INIT(GNU Data Access, major.minor.micro, gnome-db-list@gnome.org, libgda) AC_PREREQ(2.59) AC_CONFIG_SRCDIR(libgda/libgda.h) AM_INIT_AUTOMAKE(1.8 -Wall check-news no-define dist-bzip2) AC_SUBST(GDA_MAJOR_VERSION, major) AC_SUBST(GDA_MINOR_VERSION, minor) AC_SUBST(GDA_MICRO_VERSION, micro) AC_SUBST(GDA_VERSION, major.minor.micro) m4_undefine([major]) m4_undefine([minor]) m4_undefine([micro]) dnl required versions of other tools. m4_define([req_ver_glib], [2.6.0]) m4_define([req_ver_libxslt], [1.0.9]) # # Making releases: # - If interfaces have been changed or added, set GDA_CURRENT += 1 and GDA_AGE += 1, set GDA_REVISION to 0. # - If binary compatibility has been broken (e.g. removed or changed interfaces), set GDA_CURRENT += 1, GDA_REVISION and GDA_AGE to 0 # - If interfaces is the same as the previous version, set GDA_REVISION += 1 # GDA_CURRENT=3 GDA_REVISION=0 GDA_AGE=0 AC_SUBST(GDA_CURRENT) AC_SUBST(GDA_REVISION) AC_SUBST(GDA_AGE) AC_PROG_INTLTOOL([0.30]) AC_DEFINE_UNQUOTED(BONOBO_EXPLICIT_TRANSLATION_DOMAIN, "libgda-3") dnl ****************************** dnl Checks for programs dnl ****************************** AC_ISC_POSIX AC_PROG_CC AC_PROG_CXX AC_STDC_HEADERS AC_ARG_PROGRAM AM_PROG_LIBTOOL AM_PROG_LEX AC_PROG_YACC AC_PROG_MAKE_SET dnl ****************************** dnl glib-genmarshal dnl ****************************** AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) dnl ****************************** dnl Translations dnl ****************************** GETTEXT_PACKAGE=libgda-3 AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE") ALL_LINGUAS="az ca cs da de el en_CA en_GB es eu fa fi fr ga gl hr hu it ja ko ml ms nb ne nl no pl pt pt_BR ru rw sk sl sq sr sr@Latn sv tr uk vi zh_CN zh_HK zh_TW" AM_GLIB_GNU_GETTEXT dnl ****************************** dnl Checks for libraries dnl ****************************** PKG_CHECK_MODULES(LIBGDA, [ glib-2.0 >= req_ver_glib gobject-2.0 >= req_ver_glib gthread-2.0 >= req_ver_glib gmodule-2.0 >= req_ver_glib libxml-2.0 libxslt >= req_ver_libxslt ]) AC_SUBST(LIBGDA_CFLAGS) AC_SUBST(LIBGDA_LIBS) dnl ****************************** dnl Checking for FAM or gamin dnl ****************************** FAM_LIBS= FAM_CFLAGS= FAM_MISSING_WARNING="Libgda depends on FAM to provide notification when configuration files are changed, without FAM support any application using Libgda will have to be restarted when configuration files are changed to take into account those changes" PKG_CHECK_MODULES(GAMIN, gamin, have_fam=yes, have_fam=no) if test x"$have_fam" = "xyes" then FAM_CFLAGS="$GAMIN_CFLAGS" FAM_LIBS="$GAMIN_LIBS" AC_DEFINE(HAVE_FAM, [], [Define if we have FAM]) else AC_CHECK_LIB(fam, FAMOpen, [AC_CHECK_HEADERS(fam.h, [AC_DEFINE(HAVE_FAM, [], [Define if we have FAM]) FAM_LIBS="-lfam"], AC_MSG_WARN(*** FAM support will not be built (header files not found) $FAM_MISSING_WARNING ***))], AC_MSG_WARN(*** FAM support will not be built (FAM library not found) $FAM_MISSING_WARNING ***)) fi AC_SUBST(FAM_LIBS) AC_SUBST(FAM_CFLAGS) dnl ****************************** dnl gtk-doc dnl ****************************** GTK_DOC_CHECK([1.0]) dnl ****************************** dnl Checks for providers dnl ****************************** dnl Test for lib64 architectures dnl FIXME: should really check target case $host_cpu in x86_64* | sparc64*) lib="lib64";; *) lib="lib";; esac dnl this is the shared link library extension, which varies by platform case $host_os in cygwin*) libext=".dll.a" ;; *) libext=".so" ;; esac dnl Test for Berkeley DB try_bdb=true AC_ARG_WITH(bdb, [ --with-bdb= use bdb library in ],[ if test $withval = no then try_bdb=false elif test $withval = yes then dir="/usr" else dir=$withval fi ]) bdbdir="" if test $try_bdb = true then AC_CHECK_HEADER(db.h, bdb_ok=yes, bdb_ok=no, []) if test $bdb_ok = yes ; then bdbdir=yes BDB_LIBS="-ldb" else AC_MSG_CHECKING(for Berkeley DB files) for d in $dir /usr /usr/local do if test -f $d/$lib/libdb$libext -a -f $d/include/db.h then AC_MSG_RESULT(found Berkeley DB in $d) bdblib="-ldb" bdbdir=$d break fi dnl FIXME: check for db1 (non-sleepycat implementation) done if test x$bdbdir = x then AC_MSG_WARN(Berkeley DB backend not used) else AC_DEFINE(HAVE_BDB, 1, [Have Berkeley DB]) BDB_CFLAGS="-I${bdbdir}/include" BDB_LIBS="-L${bdbdir}/lib ${bdblib}" fi fi fi AM_CONDITIONAL(BDB, test x$bdbdir != x) dnl Test for ODBC try_odbc=true AC_ARG_WITH(odbc, [ --with-odbc= use ODBC libraries in ],[ if test $withval = no then try_odbc=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) odbcdir="" if test $try_odbc = true then AC_MSG_CHECKING(for ODBC files) for d in $dir /usr /usr/local do if test -f $d/$lib/libodbc$libext -a -f $d/include/sql.h then AC_MSG_RESULT(found ODBC in $d) odbclib="-lodbc" odbcdir=$d break fi if test -f $d/$lib/libiodbc$libext -a -f $d/include/sql.h then AC_MSG_RESULT(found iODBC in $d) odbclib="-liodbc" odbcdir=$d break fi if test -f $d/$lib/w32api/libodbc32.a -a -f $d/include/w32api/sql.h then AC_MSG_RESULT(found ODBC32 in $d) odbclib="-lodbc32" odbcdir=$d break fi done if test x$odbcdir = x then AC_MSG_WARN(ODBC backend not used) else AC_DEFINE(HAVE_ODBC, 1, [Have ODBC]) ODBC_CFLAGS="-I${odbcdir}/include" ODBC_LIBS="-L${odbcdir}/lib ${odbclib}" fi fi AM_CONDITIONAL(ODBC, test x$odbcdir != x) dnl Test for MySQL try_mysql=true AC_ARG_WITH(mysql, [ --with-mysql= use mysql backend in ],[ if test $withval = no then try_mysql=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) mysqldir="" if test $try_mysql = true then AC_PATH_PROG(MYSQL_CONFIG, mysql_config) if test x$MYSQL_CONFIG = x; then AC_MSG_CHECKING(for MySQL files) for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql do if test -f $d/include/mysql/mysql.h then mysqldir_suffix=/mysql else mysqldir_suffix= fi if test -f $d/$lib/mysql/libmysqlclient.a -o -f $d/$lib/mysql/libmysqlclient$libext then AC_MSG_RESULT(found mysql in $d) mysqldir=$d mysqllibdir_suffix=/mysql break fi if test -f $d/$lib/libmysqlclient.a -o -f $d/$lib/libmysqlclient$libext then AC_MSG_RESULT(found mysql in $d) mysqldir=$d mysqllibdir_suffix= break fi done if test x$mysqldir = x then AC_MSG_WARN(MySQL backend not used) else AC_DEFINE(HAVE_MYSQL, 1, [Have MySQL]) MYSQL_CFLAGS="-I${mysqldir}/include${mysqldir_suffix}" MYSQL_LIBS="-L${mysqldir}/lib${mysqllibdir_suffix} -lmysqlclient" fi else mysqldir=yes AC_DEFINE(HAVE_MYSQL, 1, [Have MySQL]) MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags` MYSQL_LIBS=`$MYSQL_CONFIG --libs` fi fi AM_CONDITIONAL(MYSQL, test x$mysqldir != x) dnl Test for mSQL try_msql=true AC_ARG_WITH(msql, [ --with-mSQL= use mSQL backend in ],[ if test $withval = no then try_msql=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) msqldir="" if test $try_msql = true then AC_MSG_CHECKING(for mSQL files) for d in $dir /usr /usr/local /usr/local/msql /opt/msql /opt/packages/msql do if test -f $d/include/msql/msql.h then msqldir_suffix=/msql else msqldir_suffix= fi if test -f $d/$lib/msql/libmsql.a -o -f $d/$lib/msql/libmsql$libext then AC_MSG_RESULT(found mSQL in $d) msqldir=$d msqllibdir_suffix=/msql break fi if test -f $d/$lib/libmsql.a -o -f $d/$lib/libmsql$libext then AC_MSG_RESULT(found mSQL in $d) msqldir=$d msqllibdir_suffix= break fi done if test x$msqldir = x then AC_MSG_WARN(mSQL backend not used) else AC_DEFINE(HAVE_MSQL, 1, [Have mSQL]) MSQL_CFLAGS="-I${msqldir}/include${msqldir_suffix}" MSQL_LIBS="-L${msqldir}/lib${msqllibdir_suffix} -lmsql" AC_MSG_CHECKING(for mSQL 3.x API) AC_TRY_RUN([ #include "${msqldir}/include${msqldir_suffix}/msql.h" int main() { int rc = INT64_TYPE; return (rc>0) ? 0 : -1; } ], AC_DEFINE(HAVE_MSQL3, 1, [Have mSQL 3.x API]) AC_MSG_RESULT(found), AC_MSG_RESULT(not found)) fi fi AM_CONDITIONAL(MSQL, test x$msqldir != x) dnl Test for PostgreSQL try_postgres=true AC_ARG_WITH(postgres, [ --with-postgres= use postgres backend in ],[ if test $withval = no then try_postgres=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) postgresdir="" if test $try_postgres = true then AC_MSG_CHECKING(for Postgres files) for d in $dir /usr /usr/local/postgres /opt/postgres /opt/packages/postgres /disk/postgres /usr/local/pgsql do if test -f $d/$lib/libpq.a -o -f $d/$lib/libpq$libext then AC_MSG_RESULT(found Postgres in $d) postgresdir=$d break fi done if test x$postgresdir = x then AC_MSG_WARN(Postgres backend not used) else if test -f ${postgresdir}/include/libpq-fe.h then POSTGRES_CFLAGS=-I${postgresdir}/include elif test -f ${postgresdir}/include/pgsql/libpq-fe.h then POSTGRES_CFLAGS=-I${postgresdir}/include/pgsql elif test -f ${postgresdir}/include/postgresql/libpq-fe.h then POSTGRES_CFLAGS=-I${postgresdir}/include/postgresql elif test -f ${postgresdir}/include/postgresql/8.0/libpq-fe.h then POSTGRES_CFLAGS=-I${postgresdir}/include/8.0/postgresql elif test -f ${postgresdir}/include/postgresql/7.4/libpq-fe.h then POSTGRES_CFLAGS=-I${postgresdir}/include/7.4/postgresql else AC_MSG_WARN(Postgres include files not found, backend not used) postgresdir="" fi POSTGRES_LIBS="-L${postgresdir}/lib -lpq" AC_DEFINE(HAVE_POSTGRES, 1, [Have PostgreSQL]) fi fi AM_CONDITIONAL(POSTGRES, test x$postgresdir != x) dnl Test for freetds provider dnl try_freetds=true AC_ARG_WITH(tds, [ --with-tds= use freetds library in ],[ if test $withval = no then try_freetds=false elif test $withval = yes then dir="/usr/local/freetds" else dir=$withval fi ]) freetdsdir="" freetds_incdir="" freetdsvercheck="" if test $try_freetds = true then AC_MSG_CHECKING(for freetds files) for d in $dir /usr/local/freetds /usr /opt/freetds /opt/packages/freetds /opt/freetds-0.50 do if test -f "$d/include/tds.h" -a -e "$d/$lib/libtds$libext" -a -f "$d/include/tdsver.h" then AC_MSG_RESULT(found freetds in $d) freetdsdir="$d" freetds_incdir="$d/include" break elif test -f "$d/include/freetds/tds.h" -a -e "$d/$lib/libtds$libext" -a -f "$d/include/freetds/tdsver.h" then AC_MSG_RESULT(found freetds in $d and includes in $d/include/freetds) freetdsdir="$d" freetds_incdir="$d/include/freetds" break fi done if test "x$freetdsdir" = "x" then AC_MSG_WARN(tds backend not used) else AC_MSG_CHECKING(for freetds version) freetdsvercheck="`grep \"^#define \(VERSION_NO \|TDS_VERSION_NO \)\" $freetds_incdir/tdsver.h|sed 's|^.*"\(.*\)"|\1|'`" if test "x$freetdsvercheck" = "x" then AC_MSG_WARN(freetds version check failed - backend not used) freetdsdir="" freetds_incdir="" else case "$freetdsvercheck" in *v0.5*) AC_MSG_RESULT($freetdsvercheck - using v0.5x api) AC_DEFINE(HAVE_FREETDS_VER0_5X, 1, [Have freetds v0.5x API]) FREETDS_CFLAGS="-I${freetds_incdir}" FREETDS_LIBS="-L${freetdsdir}/lib -ltds" AC_DEFINE(HAVE_FREETDS, 1, [Have freetds]) ;; *v0.60) AC_MSG_RESULT($freetdsvercheck - using v0.60 api) AC_DEFINE(HAVE_FREETDS_VER0_60, 1, [Have freetds v0.60 API]) FREETDS_CFLAGS="-I${freetds_incdir}" FREETDS_LIBS="-L${freetdsdir}/lib -ltds" AC_DEFINE(HAVE_FREETDS, 1, [Have freetds]) ;; *v0.6[[3-9]]*) AC_MSG_RESULT($freetdsvercheck - using v0.63 api) AC_DEFINE(HAVE_FREETDS_VER0_63, 1, [Have freetds v0.63 API]) AC_DEFINE(HAVE_FREETDS_VER0_6X, 1, [Have freetds v0.6x API]) FREETDS_CFLAGS="-I${freetds_incdir}" FREETDS_LIBS="-L${freetdsdir}/lib -ltds" AC_DEFINE(HAVE_FREETDS, 1, [Have freetds]) ;; *v0.6*) AC_MSG_RESULT($freetdsvercheck - using v0.6x api) AC_DEFINE(HAVE_FREETDS_VER0_6X, 1, [Have freetds v0.6x API]) FREETDS_CFLAGS="-I${freetds_incdir}" FREETDS_LIBS="-L${freetdsdir}/lib -ltds" AC_DEFINE(HAVE_FREETDS, 1, [Have freetds]) ;; *) AC_MSG_WARN($freetdsvercheck not supported - backend not used) freetdsdir="" freetds_incdir="" ;; esac fi fi fi AM_CONDITIONAL(FREETDS, test x$freetdsdir != x) dnl Test for IBM DB2 try_ibmdb2=true AC_ARG_WITH(ibmdb2, [ --with-ibmdb2= use IBM DB2 backend in ],[ if test $withval = no then try_ibmdb2=false elif test $withval=yes then if test -z "$DB2DIR" then dir="/usr/IBMdb2/V7.1" else dir="$DB2DIR" fi else dir=$withval fi ]) if test $try_ibmdb2 = true then AC_MSG_CHECKING(for IBM DB2 files) if test -f "$dir/include/sqlcli1.h" -a -e "$dir/$lib/libdb2.so" then ibmdb2dir="$dir" break fi for d in /usr/IBMdb2 /usr/local/IBMdb2 /opt/IBMdb2 /opt/packages/IBMdb2 do for v in V5.0 V.6.1 V7.1 do if test -f "$d/$v/include/sqlcli1.h" -a -e "$d/$v/$lib/libdb2.so" then ibmdb2dir="$d/$v" break fi done done if test x$ibmdb2dir = x then AC_MSG_WARN(IBM DB2 backend not used) else AC_MSG_RESULT(found IBM DB2 in $ibmdb2dir) AC_DEFINE(HAVE_IBMDB2, 1, [Have IBM DB2]) AC_MSG_WARN(IBM DB2 Provider does not work yet) IBMDB2_CFLAGS="-DIBMDB2_DIR=\\\"${ibmdb2dir}\\\" -I${ibmdb2dir}/include" IBMDB2_LIBS="-L${ibmdb2dir}/lib -Wl,-rpath,${ibmdb2dir}/lib -ldb2" fi fi AM_CONDITIONAL(IBMDB2, test x$ibmdb2dir != x) dnl Test for Sybase try_sybase=true dir="" AC_ARG_WITH(sybase, [ --with-sybase= use Sybase backend in ],[ AC_MSG_CHECKING(for Sybase files) if test $withval = no then try_sybase=false elif test $withval = yes then dir="/opt2/sybase" else dir=$withval fi ]) sybasedir="" if test $try_sybase = true then AC_MSG_CHECKING(for Sybase files) for d in $dir /usr/local/sybase /opt/sybase /opt/packages/sybase do if test -f "$d/include/ctpublic.h" then AC_MSG_RESULT(found Sybase in $d) sybasedir="$d" break fi for v in 11.9.2 12.5 11.0.3.3 do if test -f "$d-$v/include/ctpublic.h" then AC_MSG_RESULT(found Sybase in $d-$v) sybasedir="$d-$v" break elif test -f "$d-$v/OCS/include/ctpublic.h" then AC_MSG_RESULT(found Sybase in $d-$v) sybasedir="$d-$v/OCS" break fi done done if test x$sybasedir = x then AC_MSG_WARN(Sybase backend not used) else SYBASE_DIR=${sybasedir} SYBASE_CFLAGS="-I${sybasedir}/include" SYBASE_LIBS="-lnsl -ldl -lm" AC_MSG_CHECKING(for Sybase host system type) AC_MSG_RESULT($host) case "$host" in *linux*) sybase_ctlibs="-L${sybasedir}/lib -lct -lcs -lsybtcl -lcomn -lintl" sybase_blklibs="-L${sybasedir}/lib -lblk ${sybase_ctlibs}" SYBASE_LIBS="${SYBASE_LIBS} ${sybase_blklibs}" AC_CHECK_LIB(ct,tdsdump_on,[ AC_MSG_WARN(linking against freetds libct) AC_DEFINE(HAVE_SYBASE, 1, [Have Sybase]) ], AC_DEFINE(HAVE_SYBASE, 1, [Have Sybase])) ;; *) AC_MSG_WARN(this host type is unsupported; sybase backend not used) sybasedir="" ;; esac fi fi AM_CONDITIONAL(SYBASE, test x$sybasedir != x) dnl Link gda-sybase-srv against debugable libs AC_ARG_ENABLE(sybase-debug, [ --enable-sybase-debug=[no/min/max] no=none, min=debug msgs, max=min and link against sybase devlibs (which are static!).],,enable_sybase_debug=no) if test "x$sybasedir" != "x" then AC_MSG_CHECKING(for Sybase debugging level) if test "x$enable_sybase_debug" = "xmax" then AC_DEFINE(SYBASE_DEBUG, 1, [Enable Sybase debugging level]) if test -f $sybasedir/devlib/libct.a then AC_MSG_RESULT(max) AC_MSG_WARN(erase passwords in bug-buddy debug output before sending bugreports) SYBASE_LIBS=${sybasedir}/devlib else AC_MSG_RESULT(min) AC_MSG_WARN(no debug libraries found, using --enable-sybase-debug=min) enable_sybase_debug=min fi else AC_MSG_RESULT($enable_sybase_debug) if test "x$enable_sybase_debug" != "x" then if test "x$enable_sybase_debug" != "xno" then AC_DEFINE(SYBASE_DEBUG) fi fi fi else if test "x$enable_sybase_debug" != "xno" then AC_MSG_WARN(you applied sybase debugging options, but sybase has not been found or is unsupported, disabling debug options) fi enable_sybase_debug=no fi dnl test for ORACLE try_oracle=true AC_ARG_WITH(oracle, [ --with-oracle= use ORACLE backend in ],[ if test $withval = no then try_oracle=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) if test $try_oracle = true then AC_MSG_CHECKING(for ORACLE installation) for d in $dir $ORACLE_HOME /opt/oracle /usr do if test -f $d/$lib/libclntsh.so then AC_MSG_RESULT(found ORACLE in $d) oracledir=$d break fi done if test x$oracledir = x then AC_MSG_WARN(ORACLE backend not used) else AC_DEFINE(HAVE_ORACLE, 1, [Have ORACLE]) ORACLE_CFLAGS=" -I$oracledir/include/oracle/client -I$oracledir/rdbms/demo -I${ORACLE_HOME}/rdbms/public -I${ORACLE_HOME}/plsql/public -I$oracledir/network/public" ORACLE_LIBS="-L$oracledir/lib -lm -ldl -lclntsh" fi fi AM_CONDITIONAL(ORACLE, test x$oracledir != x) dnl test for FireBird try_firebird=true AC_ARG_WITH(firebird, [ --with-firebird= use FireBird backend in ],[ if test $withval = no then try_firebird=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) if test $try_firebird = true then AC_MSG_CHECKING(for FireBird installation) for d in $dir /usr/local/firebird /usr/local /usr /opt/firebird do if test -f $d/include/ibase.h then AC_MSG_RESULT(found FireBird in $d) firebirddir=$d break fi done if test x$firebirddir = x then AC_MSG_WARN(FireBird backend not used) else AC_DEFINE(HAVE_FIREBIRD, 1, [Have FireBird]) FIREBIRD_CFLAGS="-I${firebirddir}/include" FIREBIRD_LIBS="-L${firebirddir}/lib -lgds -ldl -lcrypt" fi fi AM_CONDITIONAL(FIREBIRD, test x$firebirddir != x) dnl Test for Xbase try_xbase=true AC_ARG_WITH(xbase, [ --with-xbase= use Xbase files in ],[ if test $withval = no then try_xbase=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) if test $try_xbase = true then AC_MSG_CHECKING(for Xbase files) xbasedir="" for d in $dir /usr /usr/local /opt/xbase do if test -f $d/include/xbase/xbase.h then AC_MSG_RESULT(found Xbase in $d) xbasedir=$d break fi done if test x$xbasedir = x then AC_MSG_WARN(Xbase backend not used) else XBASE_CFLAGS=-I${xbasedir}/include XBASE_LIBS="-L${xbasedir}/lib -lxbase" AC_DEFINE(HAVE_XBASE, 1, [Have Xbase]) fi fi AM_CONDITIONAL(XBASE, test x$xbasedir != x) dnl SQLite provider is included in the sources now, dnl so it's always built. dnl Test for MDB Tools (for MS Access files) try_mdb=true AC_ARG_WITH(mdb, [ --with-mdb= use MDB tools library in ],[ if test $withval = no then try_mdb=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) if test $try_mdb = true then AC_MSG_CHECKING(for MDB Tools files) mdbdir="" for d in $dir /usr /usr/local /opt/gnome do if test -f $d/include/mdbtools.h -a -f $d/$lib/libmdbsql$libext -o -f $d/include/mdbtools.h -a -f $d/$lib/libmdbsql.a then AC_MSG_RESULT(found MDB Tools in $d) mdbdir=$d break fi done if test x$mdbdir = x then AC_MSG_WARN(MDB backend not used) else MDB_CFLAGS=-I${mdbdir}/include MDB_LIBS="-L${mdbdir}/lib -lmdb -lmdbsql" AC_DEFINE(HAVE_MDB, 1, [Have MDB]) fi fi AM_CONDITIONAL(MDB, test x$mdbdir != x) dnl Test for LDAP try_ldap=true AC_ARG_WITH(ldap, [ --with-ldap= use LDAP library in ],[ if test $withval = no then try_ldap=false elif test $withval = yes then dir="/usr/local" else dir=$withval fi ]) if test $try_ldap = true then AC_MSG_CHECKING(for LDAP files) ldapdir="" for d in $dir /usr /usr/local /opt/openldap do if test -f $d/include/ldap.h -a -f $d/include/lber.h then AC_MSG_RESULT(found LDAP in $d) ldapdir=$d break fi done if test x$ldapdir = x then AC_MSG_WARN(LDAP backend not used) else LDAP_CFLAGS="-I${ldapdir}/include" LDAP_LIBS="-L${ldapdir}/lib -lldap -llber" AC_DEFINE(HAVE_LDAP, 1, [Have LDAP]) fi fi AM_CONDITIONAL(LDAP, test x$ldapdir != x) dnl ****************************** dnl Check for readline/history/popt dnl ****************************** AC_CHECK_LIB(readline,readline, READLINE_LIB='-lreadline -lcurses', , -lcurses) AM_CONDITIONAL(READLINE_LIB, test ! "x$READLINE_LIB" = "x") AC_SUBST(READLINE_LIB) AC_CHECK_LIB(history,add_history,HISTORY_LIB=-lhistory) AM_CONDITIONAL(HISTORY_LIB, test ! "x$HISTORY_LIB" = "x") AC_SUBST(HISTORY_LIB) AC_CHECK_LIB(popt,poptGetContext,POPT_LIB=-lpopt) AM_CONDITIONAL(POPT_LIB, test ! "x$POPT_LIB" = "x") AC_SUBST(POPT_LIB) AC_CHECK_HEADERS([popt.h readline/readline.h readline/history.h],, CONFIG_TOOL_HEADERS="wrong" && \ echo Not building gda-config-tool) AM_CONDITIONAL(BUILD_CONFIG_TOOL, (test ! "x$CONFIG_TOOL_HEADERS" = "xwrong" -a \ ! "x$READLINE_LIB" = "x" -a \ ! "x$HISTORY_LIB" = "x" -a \ ! "x$POPT_LIB" = "x")) AM_CONDITIONAL(BUILD_RUN_TOOL, test ! "x$POPT_LIB" = "x") AC_SUBST(BUILD_CONFIG_TOOL) AC_SUBST(BUILD_RUN_TOOL) dnl ****************************** dnl Check for Mono/Gtk# dnl ****************************** MONO_REQUIRED_VERSION=1.0 PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, build_gda_sharp=true, build_gda_sharp=false) if test "$build_gda_sharp" = "true"; then PKG_CHECK_MODULES(GTK_SHARP, gtk-sharp-2.0 >= 2.3.90, :, build_gda_sharp=false) PKG_CHECK_MODULES(GAPI, gapi-2.0 >= 2.3.90, :, build_gda_sharp=false) fi AM_CONDITIONAL(BUILD_GDA_SHARP, test "$build_gda_sharp" = "true") if test "$build_gda_sharp" = "true"; then AC_PATH_PROG(MONO, mono, no) AC_PATH_PROG(MCS, mcs, no) AC_PATH_PROG(GAPI_PARSER, gapi2-parser, no) AC_PATH_PROG(GAPI_FIXUP, gapi2-fixup, no) AC_PATH_PROG(GAPI_CODEGEN, gapi2-codegen, no) if test `uname -s` = "Darwin"; then LIB_PREFIX= LIB_SUFFIX=.dylib else LIB_PREFIX=.so LIB_SUFFIX= fi else AC_MSG_NOTICE("Not building gda-sharp") fi AC_SUBST(MONO) AC_SUBST(MCS) AC_SUBST(GAPI) AC_SUBST(LIB_PREFIX) AC_SUBST(LIB_SUFFIX) AC_SUBST(GTK_SHARP_CFLAGS) AC_SUBST(GTK_SHARP_LIBS) dnl dnl where to install DTD files dnl LIBGDA_DTDDIR=${datadir}/${PACKAGE}/dtd AC_SUBST(LIBGDA_DTDDIR) dnl ****************************** dnl Variables dnl ****************************** AC_SUBST(BDB_LIBS) AC_SUBST(BDB_CFLAGS) AC_SUBST(ODBC_LIBS) AC_SUBST(ODBC_CFLAGS) AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_CFLAGS) AC_SUBST(MSQL_LIBS) AC_SUBST(HAVE_MSQL3) AC_SUBST(MSQL_CFLAGS) AC_SUBST(POSTGRES_LIBS) AC_SUBST(POSTGRES_CFLAGS) AC_SUBST(PRIMEBASE_LIBS) AC_SUBST(PRIMEBASE_CFLAGS) AC_SUBST(FREETDS_LIBS) AC_SUBST(FREETDS_CFLAGS) AC_SUBST(IBMDB2_LIBS) AC_SUBST(IBMDB2_CFLAGS) AC_SUBST(SYBASE_DIR) AC_SUBST(SYBASE_LIBS) AC_SUBST(SYBASE_CFLAGS) AC_SUBST(LDAP_LIBS) AC_SUBST(LDAP_CFLAGS) AC_SUBST(ORACLE_LIBS) AC_SUBST(ORACLE_CFLAGS) AC_SUBST(FIREBIRD_LIBS) AC_SUBST(FIREBIRD_CFLAGS) AC_SUBST(MDB_LIBS) AC_SUBST(MDB_CFLAGS) AC_SUBST(CAMEL_LIBS) AC_SUBST(CAMEL_CFLAGS) AC_SUBST(XBASE_LIBS) AC_SUBST(XBASE_CFLAGS) dnl dnl Check if lib should be build with the debug mode dnl AC_ARG_ENABLE(debug, [ --enable-debug debug [default=no]], use_debug="Yes"; AC_DEFINE(GDA_DEBUG), use_debug="No") dnl Disable rebuild of glib-mkenum -generated source code: AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) # define a MAINT-like variable REBUILD which is set if Perl # is found, so autogenerated sources can be rebuilt AC_CHECK_PROGS(PERL, perl5 perl) REBUILD=\# if test "x$enable_rebuilds" = "xyes" && \ test -n "$PERL" && \ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then REBUILD= fi AC_SUBST(REBUILD) AC_OUTPUT([ Makefile libgda.spec libgda-2.0.pc po/Makefile.in libsql/Makefile libgda/Makefile libgda/handlers/Makefile libgda/sql-delimiter/Makefile libgda/graph/Makefile providers/Makefile providers/bdb/Makefile providers/freetds/Makefile providers/firebird/Makefile providers/ibmdb2/Makefile providers/ldap/Makefile providers/mdb/Makefile providers/mysql/Makefile providers/msql/Makefile providers/odbc/Makefile providers/oracle/Makefile providers/postgres/Makefile providers/sqlite/Makefile providers/sqlite/sqlite-src/Makefile providers/sybase/Makefile providers/xbase/Makefile report/Makefile report/gda-report.dtd report/libgda-report/Makefile report/testing/Makefile tools/Makefile gda-sharp/Makefile gda-sharp/gda-sharp.dll.config gda-sharp/gda-sharp-2.0.pc gda-sharp/AssemblyInfo.cs testing/Makefile doc/Makefile doc/C/Makefile data/Makefile stamp.h ]) dnl Print configuration summary echo "" echo " Configuration summary" echo " Installation prefix = $prefix" echo " Providers" echo " Berkeley DB = `if test x$bdbdir != x; then echo yes; else echo no; fi`" echo " FireBird = `if test x$firebirddir != x; then echo yes; else echo no; fi`" echo " FreeTDS = `if test x$freetdsdir != x; then echo yes; else echo no; fi`" echo " IBM DB2 = `if test x$ibmdb2dir != x; then echo yes; else echo no; fi`" echo " MDB (MS Access) = `if test x$mdbdir != x; then echo yes; else echo no; fi`" echo " MySQL = `if test x$mysqldir != x; then echo yes; else echo no; fi`" echo " mSQL = `if test x$msqldir != x; then echo yes; else echo no; fi`" echo " ODBC = `if test x$odbcdir != x; then echo yes; else echo no; fi`" echo " Oracle = `if test x$oracledir != x; then echo yes; else echo no; fi`" echo " PostgreSQL = `if test x$postgresdir != x; then echo yes; else echo no; fi`" echo " SQLite = yes (embedded in libgda)" echo " Sybase = `if test x$sybasedir != x; then echo yes; else echo no; fi`" echo " xBase (dBase, Clipper, FoxPro) = `if test x$xbasedir != x; then echo yes; else echo no; fi`" echo " LDAP = `if test x$ldapdir != x; then echo yes; else echo no; fi`" echo " C# bindings = `if test $build_gda_sharp = true; then echo yes; else echo no; fi`" echo ""