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
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# AC_INIT(PACKAGE,VERSION,maintainer, TARNAME)
AC_INIT(argtable2, 13, sheitmann@users.sourceforge.net)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/argtable2.c)
AM_CONFIG_HEADER(src/config.h)
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([libintl.h stdlib.h string.h strings.h unistd.h getopt.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM
# Checks for library functions.
AC_FUNC_STRFTIME
AC_FUNC_STRTOD
AC_CHECK_FUNCS([bzero strchr strcspn strrchr strtol])
AC_CHECK_FUNC(getopt_long, SYS_GETOPTLONG=1, SYS_GETOPTLONG=0)
AC_CHECK_FUNC(regcomp, SYS_REGEX=1, SYS_REGEX=0)
AC_CHECK_FUNC(strptime, SYS_STRPTIME=1, SYS_STRPTIME=0)
# Define automake conditionals
AM_CONDITIONAL(USE_SYS_GETOPTLONG, test "$SYS_GETOPTLONG" = "1")
AM_CONDITIONAL(USE_ARGREX, test "$SYS_REGEX" = "1")
AM_CONDITIONAL(USE_ARGDATE, test "$SYS_STRPTIME" = "1")
# check for --enable-debug argument
AC_ARG_ENABLE(
[debug],
AC_HELP_STRING([--enable-debug],[enable library debugging symbols]),
[
case $enableval in
yes) echo "enabling debugging symbols" & DEBUGFLAGS="-g -UNDEBUG";;
no) echo "disabling debugging symbols" & DEBUGFLAGS="-DNDEBUG";;
*) echo "illegal argument to --enable-debug" & exit 1;;
esac
],
[DEBUGFLAGS="-DNDEBUG"]
)
AC_SUBST(DEBUGFLAGS)
# Additional paths
AC_ARG_VAR([docdir], [Directory where argtable docs are stored])
[if test "x$docdir" = "x"
then
docdir='${prefix}/share/doc/argtable2'
fi]
AC_SUBST(exampledir, ['${docdir}/example'])
AC_CONFIG_FILES([Makefile
example/Makefile
src/Makefile
doc/Makefile
doc/argtable2.3
doc/argtable2.html
tests/Makefile
argtable2.pc
argtable2-uninstalled.pc
])
AC_OUTPUT
|