## ## Copyright (C) 2004-2006 Autodesk, Inc. ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of version 2.1 of the GNU Lesser ## General Public License as published by the Free Software Foundation. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Lesser General Public License for more details. ## ## You should have received a copy of the GNU Lesser General Public ## License along with this library; if not, write to the Free Software ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## #------------------configure.in---------------------------------------- dnl Configure.in for OSGeo FDO GenericRdbms Providers - MySQL and ODBC #---------------------------------------------------------------------- # Variables # Following are the makefile directories #---------------------------------------------------------------------- AC_INIT(FDORDBMS,4.2.0,http://fdo.osgeo.org) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(configure.in) AM_INIT_AUTOMAKE # Enable silent rules if supported. Allows for less verbose output while still displaying any compiler/linker warnings/errors m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) AC_PREFIX_DEFAULT(/usr/local/fdo-4.2.0) AC_LANG_C AC_PROG_CC AC_LANG_CPLUSPLUS AC_PROG_CXX AC_PROG_YACC AC_DISABLE_STATIC AM_PROG_LIBTOOL AC_SUBST(VERSION, "4.2.0") dnl ******************************************************* dnl FDO 4.2.0 Configuration dnl FDO / FDO Utilities / FDO Thirdpary paths dnl ******************************************************* # custom Fdo path specification AC_ARG_WITH([fdo], FDO_HELP_STRING([--with-fdo], [specifies directory for FDO API files [[default=DEFAULT]]]), [custom_fdo=$withval], [custom_fdo=DEFAULT]) if test $custom_fdo = "DEFAULT"; then if test -d $FDO && test ! $FDO = ""; then AC_MSG_NOTICE([Building with default location of FDO API files at $FDO]) else AC_MSG_ERROR([The default FDO API path $FDO is not a valid directory. Please use the custom option]) fi else if test -d $custom_fdo; then FDO="$custom_fdo" AC_MSG_NOTICE([Building with custom location of FDO API directory at $FDO]) else AC_MSG_ERROR([The specified FDO API path $custom_fdo is not a valid directory]) fi fi AC_ARG_WITH([fdo-utilities], FDO_HELP_STRING([--with-fdo-utilities], [specifies directory for FDO API Utility files [[default=DEFAULT]]]), [custom_fdo_utilities=$withval], [custom_fdo_utilities=DEFAULT]) if test $custom_fdo_utilities = "DEFAULT"; then if test -d $FDOUTILITIES && test ! $FDOUTILITIES = ""; then AC_MSG_NOTICE([Building with default location of FDO Utility files at $FDOUTILITIES]) else AC_MSG_ERROR([the default FDO Utilities path $FDOUTILITIES is not a valid directory. Please use the custom option]) fi else if test -d $custom_fdo_utilities; then FDOUTILITIES="$custom_fdo_utilities" AC_MSG_NOTICE([Building with custom location of FDO Utilities directory at $FDOUTILITIES]) else AC_MSG_ERROR([The specified FDO Utilities path $custom_fdo_utilities is not a valid directory]) fi fi AC_ARG_WITH([fdo-thirdparty], FDO_HELP_STRING([--with-fdo-thirdparty], [specifies directory for FDO API Thirdparty files [[default=DEFAULT]]]), [custom_fdo_thirdparty=$withval], [custom_fdo_thirdparty=DEFAULT]) if test $custom_fdo_thirdparty = "DEFAULT"; then if test -d $FDOTHIRDPARTY && test ! $FDOTHIRDPARTY = ""; then AC_MSG_NOTICE([Building with default location of FDO Thirdparty files at $FDOTHIRDPARTY]) else AC_MSG_ERROR([The default FDO Thirdparty path $custom_fdo_thirdparty is not a valid directory. Please use the custom option]) fi else if test -d $custom_fdo_thirdparty; then FDOTHIRDPARTY="$custom_fdo_thirdparty" AC_MSG_NOTICE([Building with custom location of FDO Thirdperty directory at $FDOTHIRDPARTY]) else AC_MSG_ERROR([The specified FDO Thirdparty path $custom_fdo_thirdparty is not a valid directory]) fi fi AC_ARG_WITH([fdo-mysql], FDO_HELP_STRING([--with-fdo-mysql], [specifies directory for MySQL SDK files [[default=DEFAULT]]]), [custom_fdo_mysql=$withval], [custom_fdo_mysql=DEFAULT]) if test $custom_fdo_mysql = "DEFAULT"; then if test -d $FDOMYSQL && test ! $FDOMYSQL = ""; then AC_MSG_NOTICE([Building with default location of MySQL SDK files at $FDOMYSQL]) else FDOMYSQL="/usr/local/mysql" fi else if test -d $custom_fdo_mysql; then FDOMYSQL="$custom_fdo_mysql" AC_MSG_NOTICE([Building with custom location of MySQL SDK files at $FDOMYSQL]) else AC_MSG_ERROR([The specified MySQL SDK path $custom_fdo_mysql is not a valid directory]) fi fi AC_ARG_WITH([fdo-odbc], FDO_HELP_STRING([--with-fdo-odbc], [specifies directory for ODBC SDK files [[default=DEFAULT]]]), [custom_fdo_odbc=$withval], [custom_fdo_odbc=DEFAULT]) if test $custom_fdo_odbc = "DEFAULT"; then if test -d $FDOODBC && test ! $FDOODBC = ""; then AC_MSG_NOTICE([Building with default location of ODBC SDK files at $FDOODBC]) else FDOODBC="/usr" fi else if test -d $custom_fdo_odbc; then FDOODBC="$custom_fdo_odbc" AC_MSG_NOTICE([Building with custom location of ODBC SDK files at $FDOODBC]) else AC_MSG_ERROR([The specified ODBC SDK path $custom_fdo_odbc is not a valid directory]) fi fi AC_SUBST(FDO) AC_SUBST(FDOUTILITIES) AC_SUBST(FDOTHIRDPARTY) AC_SUBST(FDOMYSQL) AC_SUBST(FDOODBC) # Check for Debug or Release build settings AC_ARG_ENABLE([debug], MAP_HELP_STRING([--enable-debug], [enable debug build [[default=no]]]), [enable_debug=$enableval], [enable_debug=no]) if test $enable_debug = yes; then AC_MSG_NOTICE([Using debug configuration]) CXXFLAGS="-g -MMD -MT " AC_SUBST(CXXFLAGS, ["-g -MMD -MT "]) CXXFLAGS_SDF="-g " AC_SUBST(CXXFLAGS_SDF, ["-g "]) else AC_MSG_NOTICE([Using optimized configuration]) CXXFLAGS="-O2 -MMD -MT " AC_SUBST(CXXFLAGS, ["-O2 -MMD -MT "]) fi ##output Makefiles## AC_CONFIG_FILES(Makefile) #MySQL AC_CONFIG_FILES([com/Makefile \ Docs/Makefile \ Inc/Makefile \ Nls/Makefile \ Src/Makefile \ Src/Fdo/Makefile \ Src/Fdo/Capability/Makefile \ Src/Fdo/Connection/Makefile \ Src/Fdo/Custom/Makefile \ Src/Fdo/DataStore/Makefile \ Src/Fdo/FeatureCommands/Makefile \ Src/Fdo/Filter/Makefile \ Src/Fdo/Lock/Makefile \ Src/Fdo/Lt/Makefile \ Src/Fdo/Other/Makefile \ Src/Fdo/Pvc/Makefile \ Src/Fdo/Schema/Makefile \ Src/Fdo/SpatialContext/Makefile \ Src/Gdbi/Makefile \ Src/Geometry/Makefile \ Src/Geometry/Fgf/Makefile \ Src/LongTransactionManager/Makefile \ Src/LockManager/Makefile \ Src/MySQL/Makefile \ Src/MySQL/Driver/Makefile \ Src/MySQL/Fdo/Makefile \ Src/MySQL/SchemaMgr/Makefile \ Src/MySQL/SchemaMgr/Lp/Makefile \ Src/MySQL/SchemaMgr/Ov/Makefile \ Src/MySQL/SchemaMgr/Ph/Makefile \ Src/MySQL/SchemaMgr/Ph/Rd/Makefile \ Src/Rdbi/Makefile \ Src/SchemaMgr/Makefile \ Src/SchemaMgr/Lp/Makefile \ Src/SchemaMgr/Ov/Makefile \ Src/SchemaMgr/Ph/Makefile \ Src/SchemaMgr/Ph/Cfg/Makefile \ Src/SchemaMgr/Ph/Rd/Makefile \ Src/UnitTest/Common/Makefile \ Src/UnitTest/MySql/Makefile \ Src/UnitTest/Makefile \ Src/Util/Makefile]) #PostGIS AC_CONFIG_FILES([Src/PostGis/Makefile \ Src/PostGis/Driver/Makefile \ Src/PostGis/Fdo/Makefile \ Src/PostGis/SchemaMgr/Makefile \ Src/PostGis/SchemaMgr/Lp/Makefile \ Src/PostGis/SchemaMgr/Ov/Makefile \ Src/PostGis/SchemaMgr/Ph/Makefile \ Src/PostGis/SchemaMgr/Ph/Rd/Makefile \ Src/UnitTest/PostGis/Makefile]) #ODBCDriver AC_CONFIG_FILES([Src/ODBCDriver/Makefile]) #ODBC AC_CONFIG_FILES([Src/ODBC/Makefile \ Src/ODBC/Fdo/Makefile \ Src/ODBC/SchemaMgr/Makefile \ Src/ODBC/SchemaMgr/Lp/Makefile \ Src/ODBC/SchemaMgr/Ov/Makefile \ Src/ODBC/SchemaMgr/Ph/Makefile \ Src/ODBC/SchemaMgr/Ph/Rd/Makefile \ Src/UnitTest/Odbc/Makefile]) AC_CONFIG_FILES([ Docs/doc_src/Makefile \ Docs/doc_src/group_and_page_definitions/Makefile \ Docs/doc_src/headers_and_footers/Makefile \ Docs/doc_src/headers_and_footers/MySQL/Makefile \ Docs/doc_src/headers_and_footers/ODBC/Makefile \ Docs/doc_src/headers_and_footers/SQLServerSpatial/Makefile \ Docs/doc_src/group_and_page_definitions/MySQL/Makefile \ Docs/doc_src/group_and_page_definitions/ODBC/Makefile \ Docs/doc_src/group_and_page_definitions/SQLServerSpatial/Makefile]) AC_OUTPUT