| 1 |
AC_PREREQ([2.57]) |
| 2 |
AC_INIT([popt], [1.19], [[email protected]]) |
| 3 |
AC_CONFIG_SRCDIR([src/popt.h]) |
| 4 |
AC_CONFIG_HEADERS([config.h]) |
| 5 |
|
| 6 |
dnl Must come before AM_INIT_AUTOMAKE. |
| 7 |
AC_CONFIG_AUX_DIR([build-aux]) |
| 8 |
AC_CONFIG_MACRO_DIR([m4]) |
| 9 |
AM_INIT_AUTOMAKE([1.10 foreign -Wall]) |
| 10 |
|
| 11 |
m4_version_prereq([2.70], [], [AC_PROG_CC_STDC]) |
| 12 |
AC_PROG_CC |
| 13 |
AC_USE_SYSTEM_EXTENSIONS |
| 14 |
AM_PROG_AR |
| 15 |
|
| 16 |
AC_PROG_INSTALL |
| 17 |
LT_INIT |
| 18 |
|
| 19 |
AC_SYS_LARGEFILE |
| 20 |
|
| 21 |
AC_CHECK_HEADERS([fnmatch.h glob.h langinfo.h libintl.h mcheck.h stdalign.h]) |
| 22 |
|
| 23 |
# For some systems we know that we have ld_version scripts. |
| 24 |
# Use it then as default. |
| 25 |
have_ld_version_script=no |
| 26 |
case "${host}" in |
| 27 |
*-*-linux*) |
| 28 |
have_ld_version_script=yes |
| 29 |
;; |
| 30 |
*-*-gnu*) |
| 31 |
have_ld_version_script=yes |
| 32 |
;; |
| 33 |
esac |
| 34 |
AC_ARG_ENABLE([ld-version-script], |
| 35 |
[AS_HELP_STRING([--enable-ld-version-script], |
| 36 |
[enable/disable use of linker version script. |
| 37 |
(default is system dependent)])], |
| 38 |
[have_ld_version_script=$enableval], |
| 39 |
[ : ] ) |
| 40 |
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") |
| 41 |
|
| 42 |
AC_ARG_ENABLE([build-gcov], |
| 43 |
[AS_HELP_STRING([--enable-build-gcov], [build POPT instrumented for gcov])], [dnl |
| 44 |
if test ".$enableval" = .yes; then |
| 45 |
if test ".`$CC --version 2>&1 | grep 'GCC'`" != .; then |
| 46 |
dnl # GNU GCC (usually "gcc") |
| 47 |
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" |
| 48 |
fi |
| 49 |
fi |
| 50 |
]) |
| 51 |
|
| 52 |
AC_SEARCH_LIBS([setreuid], [ucb]) |
| 53 |
AC_CHECK_FUNCS([getuid geteuid iconv mtrace secure_getenv __secure_getenv setreuid setuid stpcpy strerror vasprintf srandom glob_pattern_p mbsrtowcs]) |
| 54 |
|
| 55 |
AM_GNU_GETTEXT_VERSION([0.19.8]) |
| 56 |
AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8]) |
| 57 |
AM_GNU_GETTEXT([external]) |
| 58 |
AM_ICONV_LINK |
| 59 |
|
| 60 |
AC_ARG_ENABLE([werror], |
| 61 |
[AS_HELP_STRING([--enable-werror], |
| 62 |
[Treat warnings as errors (default: warnings are not errors)])], |
| 63 |
[enable_werror="$enableval"], |
| 64 |
[enable_werror=no]) |
| 65 |
AS_IF([test "x$enable_werror" = "xyes"], [AM_CFLAGS="$AM_CFLAGS -Werror"]) |
| 66 |
AC_SUBST([AM_CFLAGS]) |
| 67 |
|
| 68 |
AC_CONFIG_SUBDIRS() |
| 69 |
AC_CONFIG_FILES([ po/Makefile.in |
| 70 |
Doxyfile Makefile src/Makefile popt.pc tests/test-poptrc tests/Makefile |
| 71 |
]) |
| 72 |
AC_OUTPUT |