dnl Process this file with autoconf to produce a configure script. AC_INIT(mysqlcppapi/mysqlcppapi.h) #Keep junk separate: AC_CONFIG_AUX_DIR(scripts) #Tell it where to find extra macros: AM_ACLOCAL_INCLUDE(macros) AM_CONFIG_HEADER(config.h) dnl ----------------------------------------------- dnl Package name and version number (user defined) dnl ----------------------------------------------- GENERIC_NAME=mysqlcppapi GENERIC_LIBRARY_NAME=mysqlcppapi #release versioning GENERIC_MAJOR_VERSION=1 GENERIC_MINOR_VERSION=9 GENERIC_MICRO_VERSION=3 #shared library versioning GENERIC_LIBRARY_VERSION=4:0:0 # | | | # +------+ | +---+ # | | | # current:revision:age # | | | # | | +- increment if interfaces have been added # | | set to zero if interfaces have been removed # or changed # | +- increment if source code has changed # | set to zero if current is incremented # +- increment if interfaces have been added, removed or changed dnl ----------------------------------------------- dnl Package name and version number (DO NOT MODIFY) dnl ----------------------------------------------- AC_SUBST(GENERIC_LIBRARY_VERSION) PACKAGE=$GENERIC_NAME AC_SUBST(GENERIC_NAME) AC_SUBST(GENERIC_LIBRARY_NAME) GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION GENERIC_RELEASE=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION AC_SUBST(GENERIC_RELEASE) AC_SUBST(GENERIC_VERSION) VERSION=$GENERIC_VERSION AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) dnl ----------------------------------------------- dnl Checks for programs. dnl ----------------------------------------------- AC_PROG_CC AC_PROG_CXX AM_PROG_LIBTOOL AM_SANITY_CHECK # What's this for? # AC_PROG_MAKE_SET # Initialize maintainer mode: AM_MAINTAINER_MODE dnl ----------------------------------------------- dnl Checks for libraries. dnl ----------------------------------------------- # Ask user for path to libmysqlclient stuff: # Maybe one day there will be an AM_PATH_MYSQLCLIENT() macro. AC_ARG_WITH(mysql, [ --with-mysql= prefix of MySQL installation. e.g. /usr/local or /usr], [MYSQL_PREFIX=$with_mysql], AC_MSG_ERROR([You must call configure with the --with-mysql option. This tells configure where to find the MySql C library and headers. e.g. --with-mysql=/usr/local or --with-mysql=/usr This assumes that you installed mysql in /usr/local/mysql (the default) or /usr/mysql.]) ) AC_SUBST(MYSQL_PREFIX) MYSQL_LIBS="-L${MYSQL_PREFIX}/mysql/lib/mysql -lmysqlclient -L${MYSQL_PREFIX}/lib/mysql -lmysqlclient" MYSQL_CFLAGS="-I${MYSQL_PREFIX}/mysql/include" AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_CFLAGS) AC_LANG_CPLUSPLUS #Other library stuff: AC_CHECK_LIB(intl, main) AC_CHECK_LIB(socket, main) AC_CHECK_LIB(nsl, main) AC_CHECK_LIB(mysqlclient, mysql_store_result) # Add support for dmalloc: AM_WITH_DMALLOC() # Checks for header files. AC_HEADER_STDC # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST # Checks for library functions. AC_CHECK_FUNCS(strtol) # Generate Makefiles and config script. AC_OUTPUT(Makefile \ mysqlcppapi-2.0.pc \ macros/Makefile \ scripts/Makefile \ mysqlcppapi/Makefile \ mysqlcppapi/datetime/Makefile \ mysqlcppapi/fields/Makefile \ mysqlcppapi/exceptions/Makefile \ mysqlcppapi/query/Makefile \ mysqlcppapi/query_results/Makefile \ mysqlcppapi/row/Makefile \ mysqlcppapi/smartpointer/Makefile \ examples/Makefile tests/Makefile )