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
|
dnl configure script
AC_PREREQ([2.69])
AC_INIT([cadaver],[0.28],,,[https://github.com/notroj/cadaver])
AC_CONFIG_SRCDIR(src/cadaver.c)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
AC_USE_SYSTEM_EXTENSIONS
AC_DEFINE([_GNU_SOURCE], 1, [Define to enable GNU extensions])
AC_PROG_CC
AC_PROG_INSTALL
AC_LANG([C])
AC_PROG_MAKE_SET
AC_PROG_RANLIB
PKG_PROG_PKG_CONFIG
AC_ARG_ENABLE(debugging,
AS_HELP_STRING([--disable-debugging], [disable runtime debugging messages]),,
enable_debug=yes)
if test "$enable_debug" = "yes"; then
AC_DEFINE(NE_DEBUGGING, 1, [Define to enable debugging])
fi
CHECK_READLINE()
AM_ICONV
AC_ARG_ENABLE(netrc,
AS_HELP_STRING([--disable-netrc],[enable .netrc support]),,
enable_netrc=yes)
NEON_LIBRARY
m4_ifndef([NE_MINIMUM_VERSION],
[AC_FATAL([NE_MINIMUM_VERSION macro from neon>=0.34.x required to build.])])
NE_MINIMUM_VERSION(0, 29)
AC_PROVIDE([NE_SNPRINTF])
AC_SUBST(TARGET_DEPS)
NE_FORMAT_TIMET
if test "$enable_netrc" = "yes"; then
LIBOBJS="$LIBOBJS lib/netrc.o"
AC_DEFINE(ENABLE_NETRC, 1, [Define to enable netrc support])
AC_MSG_NOTICE(.netrc support is enabled)
else
AC_MSG_NOTICE(.netrc support is not enabled)
fi
dnl Check for getopt_long
AC_CHECK_FUNC(getopt_long,,
[LIBOBJS="$LIBOBJS lib/getopt.o lib/getopt1.o"])
dnl Check for strcasecmp
AC_CHECK_FUNC(strcasecmp,,[LIBOBJS="$LIBOBJS lib/strcasecmp.o"])
AC_FUNC_FNMATCH
if test $ac_cv_func_fnmatch_works = no; then
LIBOBJS="$LIBOBJS lib/fnmatch.o"
fi
AC_HEADER_DIRENT
AC_STRUCT_DIRENT_D_INO
AC_TYPE_UNSIGNED_LONG_LONG_INT
AC_CHECK_HEADERS(sys/time.h fcntl.h pwd.h stdarg.h vmsdir.h memory.h alloca.h ncurses.h sgtty.h termios.h termio.h locale.h)
AC_CHECK_FUNCS(strdup strerror memcpy strcoll tcsetattr getpass stty fchmod strtoull gettimeofday secure_getenv setlocale)
AC_CACHE_CHECK([whether GLOB_ALTDIRFUNC is available], [cad_cv_glob_altdirfunc],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stddef.h>
#include <glob.h>]],
[[glob_t gl = {0}; (void) glob("test", GLOB_ALTDIRFUNC, NULL, &gl);]])],
[cad_cv_glob_altdirfunc=yes], [cad_cv_glob_altdirfunc=no])])
if test x$cad_cv_glob_altdirfunc = xno; then
LIBOBJS="$LIBOBJS lib/glob/glob.o"
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/lib/glob"
fi
dnl Required for AM_GNU_GETTEXT:
PACKAGE=cadaver
VERSION="$PACKAGE_VERSION"
AC_SUBST(VERSION)
AC_SUBST(PACKAGE)
mkdir_p='$(MKDIR_P)'
AC_SUBST(mkdir_p)
XGETTEXT_EXTRA_OPTIONS=--from-code=UTF-8
AM_GNU_GETTEXT_VERSION([0.22.5])
AM_GNU_GETTEXT([external])
AM_LANGINFO_CODESET
if test "$USE_NLS" = "yes"; then
nls_msg="Built using native support"
LIBS="$LIBS $LIBINTL"
else
nls_msg="Not built"
fi
NEON_WARNINGS
# Pick up config.h etc; and before any other paths.
CPPFLAGS="-I\$(top_builddir) -I\$(top_srcdir)/lib $CPPFLAGS"
AC_CONFIG_FILES([Makefile po/Makefile.in])
AC_CONFIG_COMMANDS([source-directories],
[for f in lib src; do test -d $f || mkdir $f; done])
AC_OUTPUT
AC_MSG_NOTICE([Configured to build cadaver ${PACKAGE_VERSION}:
Install prefix: ${prefix}
Compiler: ${CC}
Neon library: ${neon_library_message}
XML Parser: ${neon_xml_parser_message}
SSL library: ${ne_SSL_message}
Internationalization: ${nls_msg}
GNU readline support: ${msg_readline}
])
|