AC_INIT(lib/gda-common/gda-common.h) GDA_MAJOR_VERSION=0 GDA_MINOR_VERSION=2 GDA_MICRO_VERSION=96 GDA_VERSION=$GDA_MAJOR_VERSION.$GDA_MINOR_VERSION.$GDA_MICRO_VERSION AC_SUBST(GDA_MAJOR_VERSION) AC_SUBST(GDA_MINOR_VERSION) AC_SUBST(GDA_MICRO_VERSION) AC_SUBST(GDA_VERSION) # # 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=0 GDA_REVISION=0 GDA_AGE=0 AC_SUBST(GDA_CURRENT) AC_SUBST(GDA_REVISION) AC_SUBST(GDA_AGE) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(libgda, $GDA_VERSION) AM_MAINTAINER_MODE AM_ACLOCAL_INCLUDE(macros) AM_PROG_XML_I18N_TOOLS dnl dnl Checks for programs dnl AC_ISC_POSIX AC_PROG_CC AC_PROG_CXX AC_PROG_YACC AC_STDC_HEADERS AC_ARG_PROGRAM AM_PROG_LIBTOOL dnl dnl Checks for libraries dnl AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(glib test failed),gthread) AM_PATH_GTK(1.0.0,,AC_MSG_ERROR(gtk+ test failed)) gda_base_libs="$GLIB_LIBS $GTK_LIBS" gda_base_cflags="$GLIB_CFLAGS $GTK_CFLAGS" dnl Check for ORBit AC_MSG_CHECKING(for ORBit) if orbit-config --libs > /dev/null 2>&1 then AC_MSG_RESULT(found) ORBIT_IDL=`which orbit-idl` else AC_MSG_ERROR(not found) fi dnl Check for GConf use_gconf=false gconfminver="0.9" AC_MSG_CHECKING(for GConf >= $gconfminver) if gconf-config --libs gconf > /dev/null 2>&1 then gconfver=`gconf-config --version | awk 'BEGIN {FS="."}{printf "%d", $1*1000+$2}'` if test "$gconfver" -ge 9 then AC_MSG_RESULT(found) gda_gconf_libs=`gconf-config --libs gconf` gda_gconf_cflags=`gconf-config --cflags gconf` use_gconf=true fi fi if test -z $use_gconf then AC_MSG_ERROR([ *** GConf $gconfminver or later is necessary in order to build libgda.]) fi # Bonobo checks AC_MSG_CHECKING(for Bonobo >= 1.0.9) if gnome-config --libs bonobo > /dev/null 2>&1 then verstxt=`gnome-config --modversion bonobo` vers=`echo "$verstxt" | sed -e "s/^bonobo-//" | \ awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` if test "$vers" -ge 1000009 then AC_MSG_RESULT(found) else AC_MSG_ERROR([ *** Bonobo 1.0.9 or later is necessary to build libgda.]) fi else AC_MSG_ERROR([ *** Bonobo 1.0.9 or later is necessary to build libgda.]) fi gda_bonobo_cflags=`gnome-config --cflags bonobox` gda_bonobo_libs=`gnome-config --libs bonobox` dnl Check for libxml AC_MSG_CHECKING(for libxml) if xml-config --libs > /dev/null 2>&1 then gda_xml_libs=`xml-config --libs` gda_xml_cflags=`xml-config --cflags` AC_MSG_RESULT(found) else AC_MSG_ERROR(not found) fi dnl Check for libxslt AC_MSG_CHECKING(for libxslt) if xslt-config --libs > /dev/null 2>&1 then AC_MSG_RESULT(found) gda_xslt_libs=`xslt-config --libs` gda_xslt_cflags=`xslt-config --cflags` else AC_MSG_WARN(not found) fi dnl ****************************** dnl gtk-doc dnl ****************************** AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) AC_SUBST(HAVE_GTK_DOC) AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) if test x$enable_gtk_doc = xauto ; then if test x$GTKDOC = xtrue ; then enable_gtk_doc=yes else enable_gtk_doc=no fi fi AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) dnl ****************************** dnl scrollkeeper dnl ****************************** SCROLLKEEPER_REQUIRED=0.1.4 AC_SUBST(SCROLLKEEPER_REQUIRED) AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no) if test x$SCROLLKEEPER_CONFIG = xno then AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package) fi SCROLLKEEPER_LOCALSTATE_DIR=`scrollkeeper-config --pkglocalstatedir` AC_SUBST(SCROLLKEEPER_LOCALSTATE_DIR) dnl ****************************** dnl Checks for providers dnl ****************************** dnl Test for ODBC AC_ARG_WITH(odbc, [ --with-odbc= use ODBC libraries in ],[ if test $withval != yes then dir=$withval else dir="/usr/local" fi odbcdir="" AC_MSG_CHECKING(for ODBC files) for d in $dir /usr /usr/local do if test -f $d/lib/libodbc.so then AC_MSG_RESULT(found ODBC in $d) odbclib="-lodbc" odbcdir=$d break fi if test -f $d/lib/libiodbc.so then AC_MSG_RESULT(found iODBC in $d) odbclib="-liodbc" odbcdir=$d break fi done if test x$odbcdir = x then AC_MSG_WARN(ODBC backend not used) else AC_DEFINE(HAVE_ODBC) ODBC_CFLAGS="-I${odbcdir}/include" ODBC_LIBS="-L${odbcdir}/lib ${odbclib}" fi ]) AM_CONDITIONAL(ODBC, test x$odbcdir != x) dnl Test for MySQL AC_ARG_WITH(mysql, [ --with-mysql= use mysql backend in ],[ if test $withval != yes then dir=$withval else dir="/usr/local" fi mysqldir="" 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.so 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.so 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) MYSQL_CFLAGS="-I${mysqldir}/include${mysqldir_suffix}" MYSQL_LIBS="-L${mysqldir}/lib${mysqllibdir_suffix} -lmysqlclient" if test -f ${mysqldir}/lib${mysqllibdir_suffix}/libmystrings.a then MYSQL_LIBS="${MYSQL_LIBS} -lmystrings" fi fi ]) AM_CONDITIONAL(MYSQL, test x$mysqldir != x) dnl Test for PostgreSQL AC_ARG_WITH(postgres, [ --with-postgres= use postgres backend in ],[ if test $withval != yes then dir=$withval else dir="/usr/local" fi AC_MSG_CHECKING(for Postgres files) postgresdir="" 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.so 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 else AC_MSG_WARN(Postgres include files not found, backend not used) postgresdir="" fi POSTGRES_LIBS="-L${postgresdir}/lib -lpq" AC_DEFINE(HAVE_POSTGRES) fi ]) AM_CONDITIONAL(POSTGRES, test x$postgresdir != x) dnl Check for Primebase AC_ARG_WITH(primebase, [ --with-primebase= use primebase sdk in ],[ if test $withval != yes then dir=$withval else dir="/opt/primebase/sdk" fi primebasedir="" AC_MSG_CHECKING(for PrimeBase SDK >= 4.0 Pre-final) for d in $dir /opt/primebase /usr/local/primebase do if test -e ${d}/lib/libpbvm.so then for i in sdk include do if test -e ${d}/${i}/pbapi.h then primebasedir=${d} PRIMEBASE_LIBS="-lm -lnsl -L${d}/lib -lpbvm" PRIMEBASE_CFLAGS="-I${d}/${i}" AC_DEFINE(HAVE_PRIMEBASE) break fi done fi done if test x$primebasedir != x then AC_MSG_RESULT(found PrimeBase SDK in $primebasedir) else AC_MSG_RESULT(not found) fi ]) AM_CONDITIONAL(PRIMEBASE, test x$primebasedir != x) dnl Test for freetds provider AC_ARG_WITH(tds, [ --with-tds= use freetds library in ],[ if test $withval != yes then dir=$withval else dir="/usr/local/freetds" fi AC_MSG_CHECKING(for freetds files) freetdsdir="" for d in $dir /usr/local/freetds /opt/freetds /opt/packages/freetds /opt/freetds-0.50 do if test -f $d/include/ctpublic.h then AC_MSG_RESULT(found freetds in $d) freetdsdir=$d break fi done if test x$freetdsdir = x then AC_MSG_WARN(tds backend not used) else TDS_CFLAGS=-I${freetdsdir}/include TDS_LIBS="-L${freetdsdir}/lib -lct" AC_DEFINE(HAVE_TDS) fi ]) AM_CONDITIONAL(TDS, test x$freetdsdir != x) dnl Test for Sybase AC_ARG_WITH(sybase, [ --with-sybase= use Sybase backend in ],[ AC_MSG_CHECKING(for Sybase files) if test $withval != yes then dir=$withval else dir="/opt2/sybase" fi sybasedir="" 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 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 fi done done if test x$sybasedir = x then AC_MSG_WARN(Sybase backend not used) else SYBASE_CFLAGS="-I${sybasedir}/include" SYBASE_LIBS="-lnsl -ldl -lm -L${sybasedir}/lib" AC_MSG_CHECKING(for Sybase host system type) AC_MSG_RESULT($host) case "$host" in *linux*) sybase_ctlibs="-lct -lcs -lsybtcl -lcomn -lintl" sybase_blklibs="-lblk ${sybase_ctlibs}" SYBASE_LIBS="${SYBASE_LIBS} ${sybase_ctlibs} ${sybase_blklibs}" AC_DEFINE(HAVE_SYBASE) ;; *) AC_MSG_WARN(this host type is unsupported; sybase backend not used) sybasedir="" ;; esac 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) 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 LDAP AC_ARG_WITH(ldap, [ --with-ldap= use LDAP backend in ],[ if test $withval != yes then dir=$withval else dir="/usr/local" fi AC_MSG_CHECKING(for LDAP files) ldapdir="" for d in $dir /usr /usr/local/ldap /opt/ldap /opt/packages/ldap /usr/local/openldap /opt/openldap /opt/packages/openldap do if test -f $d/lib/libldap.so then AC_MSG_RESULT(found LDAP in $d) LDAP_LIBS="-lldap -llber" ldapdir=$d break fi if test -f $d/lib/libopenldap.so then AC_MSG_RESULT(found OpenLDAP in $d) LDAP_LIBS="-lopenldap -llber-openldap" ldapdir=$d break fi done if test x$ldapdir = x then AC_MSG_WARN(LDAP backend not used) else if test -f ${ldapdir}/include/ldap.h then LDAP_CFLAGS="-I${ldapdir}/include" elif test -f ${ldapdir}/include/openldap/ldap.h then LDAP_CFLAGS="-I${ldapdir}/include/openldap" else AC_MSG_WARN(LDAP include files not found. backend not used) ldapdir="" fi AC_DEFINE(HAVE_LDAP) LDAP_LIBS="-L${ldapdir}/lib ${LDAP_LIBS}" fi ]) AM_CONDITIONAL(LDAP, test x$ldapdir != x) dnl test for ORACLE AC_ARG_WITH(oracle, [ --with-oracle= use ORACLE backend in ],[ if test $withval != yes then dir=$withval else dir="/usr/local" fi AC_MSG_CHECKING(for ORACLE installation) for d in $dir $ORACLE_HOME /opt/oracle 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) ORACLE_CFLAGS="-I${ORACLE_HOME}/rdbms/demo -I${ORACLE_HOME}/rdbms/public -I${ORACLE_HOME}/plsql/public -I${ORACLE_HOME}/network/public" ORACLE_LIBS="-L${ORACLE_HOME}/lib -lm -ldl -lserver8 -lclient8 \ -lgeneric8 -lcommon8 -lvsn8 -lagent8 -lmm -lclntst8 \ -lslax8 -lsql8 -lcore8 -lnls8 -lplc8 -lplp8 -lpls8 \ -lpsa8" fi ]) AM_CONDITIONAL(ORACLE, test x$oracledir != x) dnl test for INTERBASE AC_ARG_WITH(interbase, [ --with-interbase= use INTERBASE backend in ],[ if test $withval != yes then dir=$withval else dir="/usr/local" fi AC_MSG_CHECKING(for INTERBASE installation) for d in $dir /usr/local/interbase /usr/local /usr /opt/interbase do if test -f $d/include/ibase.h then AC_MSG_RESULT(found INTERBASE in $d) interbasedir=$d break fi done if test x$interbasedir = x then AC_MSG_WARN(INTERBASE backend not used) else AC_DEFINE(HAVE_INTERBASE) INTERBASE_CFLAGS="-I${interbasedir}/include" INTERBASE_LIBS="-L${interbasedir}/lib -lgds -ldl -lcrypt" fi ]) AM_CONDITIONAL(INTERBASE, test x$interbasedir != x) dnl test for MDB libraries AC_ARG_WITH(mdb, [ --with-mdb= use MDB libraries in ],[ if test $withval != yes then dir=$withval else dir="/usr/local" fi AC_MSG_CHECKING(for MDB installation) for d in $dir /usr/local/mdbtools /usr/local /usr /opt/mdbtools do if test -f $d/include/mdbtools.h then AC_MSG_RESULT(found MDB in $d) mdbdir=$d break fi done if test x$mdbdir = x then AC_MSG_WARN(MDB libraries not used) else AC_DEFINE(HAVE_MDB) MDB_CFLAGS="-I${mdbdir}/include" MDB_LIBS="-L{mdbdir}/lib -lmdb" fi ]) AM_CONDITIONAL(MDB, test x$mdbdir != x) dnl test for Camel AC_ARG_WITH(camel, [ --with-camel= use Mail backend in ],[ if test $withval != yes then dir=$withval else dir="/usr/local" fi AC_MSG_CHECKING(for Camel files) cameldir="" for d in $dir /usr /usr/local do if test -f $d/bin/evolution then AC_MSG_RESULT(found Camel in $d) cameldir=$d break fi done if test x$cameldir = x then AC_MSG_WARN(Mail backend not used) else CAMEL_CFLAGS="-I$d/include" CAMEL_LIBS="-L${cameldir}/lib -lcamel" AC_DEFINE(HAVE_CAMEL) fi ]) AM_CONDITIONAL(MAIL, test x$cameldir != x) dnl dnl Translations dnl ALL_LINGUAS="ca da de el es fi fr ga gl hu it ja nl nn no pl pt pt_BR ru sk sl sv uk" AM_GNOME_GETTEXT dnl dnl Variables dnl GDA_CLIENT_LIBS="$gda_base_libs $gda_xml_libs $gda_gconf_libs $gda_bonobo_libs" GDA_CLIENT_CFLAGS="$gda_base_cflags $gda_xml_cflags $gda_gconf_cflags $gda_bonobo_cflags" GDA_PROVIDER_LIBS="$gda_base_libs $gda_xml_libs $gda_gconf_libs $gda_bonobo_libs" GDA_PROVIDER_CFLAGS="$gda_base_cflags $gda_xml_cflags $gda_gconf_cflags $gda_bonobo_cflags" XML_LIBS="$gda_xslt_libs" XML_CFLAGS="$gda_xslt_cflags" IDL_FLAGS=`gnome-config --cflags idl` AC_SUBST(IDL_FLAGS) AC_SUBST(GDA_CLIENT_LIBS) AC_SUBST(GDA_CLIENT_CFLAGS) AC_SUBST(GDA_PROVIDER_LIBS) AC_SUBST(GDA_PROVIDER_CFLAGS) AC_SUBST(ODBC_LIBS) AC_SUBST(ODBC_CFLAGS) AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_CFLAGS) AC_SUBST(POSTGRES_LIBS) AC_SUBST(POSTGRES_CFLAGS) AC_SUBST(PRIMEBASE_LIBS) AC_SUBST(PRIMEBASE_CFLAGS) AC_SUBST(TDS_LIBS) AC_SUBST(TDS_CFLAGS) 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(INTERBASE_LIBS) AC_SUBST(INTERBASE_CFLAGS) AC_SUBST(MDB_LIBS) AC_SUBST(MDB_CFLAGS) AC_SUBST(CAMEL_LIBS) AC_SUBST(CAMEL_CFLAGS) AC_SUBST(XML_LIBS) AC_SUBST(XML_CFLAGS) AC_SUBST(ORBIT_IDL) AC_OUTPUT([ Makefile libgda.spec macros/Makefile po/Makefile.in intl/Makefile idl/Makefile lib/Makefile lib/gda-common/Makefile lib/gda-client/Makefile lib/gda-server/Makefile bindings/Makefile bindings/c++/Makefile providers/Makefile providers/gda-default-server/Makefile providers/gda-default-server/sqlite/Makefile providers/gda-odbc-server/Makefile providers/gda-mysql-server/Makefile providers/gda-postgres-server/Makefile providers/gda-primebase-server/Makefile providers/gda-sybase-server/Makefile providers/gda-tds-server/Makefile providers/gda-ldap-server/Makefile providers/gda-oracle-server/Makefile providers/gda-interbase-server/Makefile providers/gda-mdb-server/Makefile providers/gda-mail-server/Makefile tools/Makefile tools/gda-config tools/gda-buildserver tools/gda-buildclient tools/templates/Makefile testing/Makefile doc/Makefile doc/es/Makefile doc/C/Makefile doc/C/reference/Makefile doc/C/reference/libgda-common/Makefile doc/C/reference/libgda-client/Makefile doc/pt_BR/Makefile stamp.h ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])