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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
# Created by Denis Pershin <dyp@inetlab.com>
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acinclude.m4) dnl a source file from your sub dir, but acinclude.m4 does the job
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
XSUBDIRS="xbase examples bin html libtest tv"
AC_SUBST(XSUBDIRS)
dnl You have to change this
AM_INIT_AUTOMAKE(xbase, 2.0.0, nodefine) dnl searches for some needed programs
dnl generate the config header
AM_CONFIG_HEADER(xbase/xbconfig.h) dnl at the distribution this done
dnl Checks for programs.
AC_CHECK_COMPILERS
KDE_PROG_LIBTOOL
AC_CHECK_PROG(doxygen, doxygen, yes, no)
if test "$doxygen" = "yes"; then
XSUBDIRS="$XSUBDIRS docs"
fi
dnl find out some variables
AC_AIX
AC_MINIX
dnl for NLS support. Call them in this order!
AC_LANG_CPLUSPLUS dnl switch to C++
dnl Checks for header files.
AC_LANG_CPLUSPLUS dnl switch to C++
AC_HEADER_DIRENT dnl check for dirent.h
AC_HEADER_STDC dnl check for other stdc headers. More traditional ;)
dnl check for some more header files. You can remove some of
dnl them, if you want to. But it doesn't hurt
AC_CHECK_HEADERS(string.h strings.h io.h exception g++/exception.h sys/types.h sys/locking.h fcntl.h stdarg.h ctype.h tvision/tv.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_TIME
dnl check if the compiler has bool
AC_CHECK_BOOL
dnl check if the system needs some #defines
AC_CHECK_GNU_EXTENSIONS
dnl Checks for library functions.
AC_CHECK_FUNCS(flock) dnl
AC_CHECK_FUNCS(fcntl)
AC_CHECK_FUNCS(snprintf) dnl
AC_CHECK_FUNCS(socket vsnprintf vsprintf)
AC_CHECK_SETENV
AC_LANG_CPLUSPLUS
AC_CHECK_FUNCS(getdomainname)
AC_CHECK_FUNCS(strcasecmp)
AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket"]) dnl for Solaris
AC_CHECK_LIB(nsl, gethostbyname, [LIBNSL="-lnsl"]) dnl for Solaris
AC_SUBST(LIBSOCKET)
AC_SUBST(LIBNSL)
dnl Perform program name transformation
AC_ARG_PROGRAM
AC_ARG_WITH(index-ndx, [ --without-index-ndx do not compile .ndx index support ], enable_index_ndx="$withval", enable_index_ndx="yes")
if test "$enable_index_ndx" = "yes"; then
AC_DEFINE(XB_INDEX_NDX,1)
fi
AC_ARG_WITH(index-ntx, [ --without-index-ntx do not compile .ntx index support ], enable_index_ntx="$withval", enable_index_ntx="yes")
if test "$enable_index_ntx" = "yes"; then
AC_DEFINE(XB_INDEX_NTX,1)~
fi
AC_ARG_WITH(memo-fields, [ --without-memo-fields do not compile memo fields support ], enable_memo_fields="$withval", enable_memo_fields="yes")
if test "$enable_memo_fields" = "yes"; then
AC_DEFINE(XB_MEMO_FIELDS,1)
fi
AC_ARG_WITH(expressions, [ --without-expressions do not compile expressions support ], enable_expressions="$withval", enable_expressions="yes")
if test "$enable_expressions" = "yes"; then
AC_DEFINE(XB_EXPRESSIONS,1)
fi
AC_ARG_WITH(ui-html, [ --without-ui-html do not compile HTML support ], enable_ui_html="$withval", enable_ui_html="yes")
if test "$enable_ui_html" = "yes"; then
AC_DEFINE(XB_HTML,1)
fi
AC_ARG_WITH(xbase-locking, [ --without-xbase-locking turn off XBase file locking ], enable_xbase_locking="$withval", enable_xbase_locking="yes")
if test "$enable_xbase_locking" = "yes"; then
AC_DEFINE(XB_LOCKING_ON,1)
fi
AC_ARG_WITH(realdelete, [ --without-realdelete turn off XBase record deletion ], enable_realdelete="$withval", enable_realdelete="yes")
if test "$enable_realdelete" = "yes"; then
AC_DEFINE(XB_REAL_DELETE,1)
fi
AC_ARG_WITH(xbase-filters, [ --without-xbase-filters turn off XBase filter logic ], enable_xbase_filters="$withval", enable_xbase_filters="yes")
if test "$enable_xbase_filters" = "yes"; then
AC_DEFINE(XB_FILTERS,1)
fi
AC_ARG_WITH(xbase-debug, [ --without-xbase-debug turn off XBase specific debug ], enable_xbase_debug="$withval", enable_xbase_debug="yes")
if test "$enable_xbase_debug" = "yes"; then
AC_DEFINE(XBASE_DEBUG,1)
fi
AC_ARG_WITH(exceptions, [ --with-exceptions turn on exceptions ], enable_exceptions="$withval", enable_exceptions="no")
if test "$enable_exceptions" = "yes"; then
AC_DEFINE(HAVE_EXCEPTIONS,1)
fi
AC_ARG_WITH(castellano, [ --with-castellano turn on spanish date logic ], enable_castellano="$withval", enable_castellano="no")
if test "$enable_castellano" = "yes"; then
AC_DEFINE(XB_CASTELLANO,1)
fi
dnl output files
topdir=`pwd`
AC_SUBST(topdir)
if test "$ac_cv_header_tvision_tv_h" = "yes"; then
TVPROGS="tvxbase"
else
TVPROGS=
fi
AC_SUBST(TVPROGS)
dnl add here all your Makefiles
AC_OUTPUT([
Makefile
xbase/Makefile
xbase/xbase.h
examples/Makefile
bin/Makefile
html/Makefile
tv/Makefile
libtest/Makefile
dnl ybase/Makefile
xbase-config
xbase.spec
docs/doxygen.cfg
docs/Makefile
],
[
chmod +x xbase-config
]
)
|