1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
dnl ############################################################################
dnl ############################################################################
AC_PREREQ(2.52)
AC_INIT([yada], [1.0.2], [yada@oftc.net], [yada])
AC_SUBST(LIB_VERSION, [5:0:1])
AC_REVISION($Revision: 146 $)
AC_PREFIX_DEFAULT([/usr/local])
dnl ############################################################################
dnl ## additional args
BUILD_EXTRA=
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [enable debugging output]),
[Debug="$enableval"
CFLAGS="-g"], [Debug=no]
)
AC_SUBST(Debug)
STRIP_OPT=-s
AC_ARG_ENABLE(strip,
AC_HELP_STRING([--disable-strip], [Disable calling strip(1) on install]),
[if test "x$enableval" = "xno" ; then
STRIP_OPT=
fi]
)
AC_SUBST(STRIP_OPT)
dnl ############################################################################
dnl ## check for requirements
dnl AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_AWK
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_YACC
AC_PROG_LEX
AC_LIBLTDL_INSTALLABLE
AC_SUBST(LTDLINCL)
AC_SUBST(LIBLTDL)
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_CONFIG_SUBDIRS(libltdl)
dnl AC_CHECK_LIB(readline, readline)
dnl AC_CHECK_LIB(termcap)
AC_HEADER_STDC
AC_HEADER_STAT
AC_CHECK_HEADERS([string.h unistd.h])
AC_DEFINE(_GNU_SOURCE, 1, [define for GNU extensions])
AC_CHECK_FUNCS([strndup])
dnl ############################################################################
dnl ## check for available modules
CHECK_MYSQL
CHECK_ORACLE
CHECK_OCI_VERSION
CHECK_PGSQL
CHECK_SQLITE3
AC_SUBST(YADA_BUILD_MODULES)
AC_DEFINE_UNQUOTED(YADA_BUILD_MODULES, "$YADA_BUILD_MODULES",
[modules yada was compiled with])
dnl ############################################################################
dnl ## additional processing
if test "$Debug" = "yes"; then
AC_DEFINE(DEBUGMODE, 1, [Define if you want debug mode on])
fi
dnl ############################################################################
dnl ## generate files
AC_SUBST(LIBTOOL_DEPS)
AC_SUBST(BUILD_EXTRA)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(src/Makefile)
AC_CONFIG_FILES(docs/doxygen.conf)
AC_CONFIG_FILES(docs/version.texi)
AC_CONFIG_FILES(docs/Makefile)
AC_CONFIG_FILES(test/Makefile)
AC_CONFIG_FILES($CONFIG_EXTRA)
AC_OUTPUT
dnl ############################################################################
dnl ## print summary
echo
echo "############################################################"
echo "Yada configuration complete."
echo
echo "prefix: $prefix"
echo
echo "MySQL support: $check_mysql"
if test "$check_mysql" = "yes"; then
echo " headers from: $check_mysql_incdir"
echo " libs from: $check_mysql_libdir"
fi
echo "Oracle support: $check_oracle"
if test "$check_oracle" = "yes"; then
echo " headers from: $check_oracle_incdir"
echo " libs from: $check_oracle_libdir"
fi
echo "PostgreSQL support: $check_pgsql"
if test "$check_pgsql" = "yes"; then
echo " headers from: $check_pgsql_incdir"
echo " libs from: $check_pgsql_libdir"
fi
echo "SQLite3 support: $check_sqlite3"
if test "$check_sqlite3" = "yes"; then
echo " headers from: $check_sqlite3_incdir"
echo " libs from: $check_sqlite3_libdir"
fi
echo "############################################################"
echo
dnl ############################################################################
dnl ############################################################################
|