2 AC_INIT(popt, 1.16, popt-devel@rpm5.org)
3 AC_CONFIG_SRCDIR([popt.h])
4 AC_CONFIG_HEADERS([config.h])
7 dnl Must come before AM_INIT_AUTOMAKE.
8 dnl AC_CONFIG_AUX_DIR([build-aux])
9 AC_CONFIG_MACRO_DIR([m4])
10 AM_INIT_AUTOMAKE([foreign -Wall])
13 # Library code modified: REVISION++
14 # Interfaces changed/added/removed: CURRENT++ REVISION=0
15 # Interfaces added: AGE++
16 # Interfaces removed: AGE=0
17 AC_SUBST(LT_CURRENT, 0)
18 AC_SUBST(LT_REVISION, 0)
21 ALL_LINGUAS="cs da de eo es fi fr ga gl hu id is it ja ko lv nb nl pl pt ro ru sk sl sv th tr uk vi wa zh_TW zh_CN"
29 dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
30 dnl requires gcc). If it's not, don't rebuild dependencies -- use what was
32 if test X"$GCC" = "Xyes"; then
33 CFLAGS="$CFLAGS -Wall -W"
34 TARGET="depend allprogs"
37 dnl let the Makefile know that we're done with `depend', since we don't
38 dnl have gcc we're not going to rebuild our dependencies at all.
43 CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT"
51 AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h)
53 # For some systems we know that we have ld_version scripts.
54 # Use it then as default.
55 have_ld_version_script=no
58 have_ld_version_script=yes
61 have_ld_version_script=yes
64 AC_ARG_ENABLE([ld-version-script],
65 AC_HELP_STRING([--enable-ld-version-script],
66 [enable/disable use of linker version script.
67 (default is system dependent)]),
68 [have_ld_version_script=$enableval],
70 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
72 AC_ARG_ENABLE(build-gcov,
73 AS_HELP_STRING([--enable-build-gcov], [build POPT instrumented for gcov]), [dnl
74 if test ".$enableval" = .yes; then
75 if test ".`$CC --version 2>&1 | grep 'GCC'`" != .; then
76 dnl # GNU GCC (usually "gcc")
77 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
82 AC_CHECK_FUNC(setreuid, [], [
83 AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
85 AC_CHECK_FUNCS(getuid geteuid iconv mtrace __secure_getenv setregid stpcpy strerror vasprintf srandom)
87 AM_GNU_GETTEXT([external])
90 popt_sysconfdir="${sysconfdir}"
91 eval "popt_sysconfdir=\"${popt_sysconfdir}\"" # expand contained ${prefix}
92 AC_DEFINE_UNQUOTED([POPT_SYSCONFDIR], ["$popt_sysconfdir"], [Full path to default POPT configuration directory])
95 # Define a (hope) portable Libs pkgconfig directive that
96 # - Don't harm if the default library search path include ${libdir}
97 # (https://bugzilla.novell.com/show_bug.cgi?id=529921)
98 # - Don't require a not upstream patch to pkgconfig
99 # (https://bugs.freedesktop.org/show_bug.cgi?id=16095)
100 popt_pkgconfig_libs='-L${libdir} -lpopt'
104 /usr/lib|/usr/lib64|/lib|/lib64)
105 popt_pkgconfig_libs='-lpopt'
108 popt_pkgconfig_libs='-L${libdir} -lpopt'
114 /usr/lib|/usr/lib64|/lib|/lib64)
115 popt_pkgconfig_libs='-lpopt'
118 popt_pkgconfig_libs='-L${libdir} -lpopt'
123 AC_SUBST([POPT_PKGCONFIG_LIBS],"$popt_pkgconfig_libs")
125 POPT_SOURCE_PATH="`pwd`"
126 AC_DEFINE_UNQUOTED(POPT_SOURCE_PATH, "$POPT_SOURCE_PATH",
127 [Full path to popt top_srcdir.])
128 AC_SUBST(POPT_SOURCE_PATH)
131 AC_CONFIG_FILES([ po/Makefile.in m4/Makefile
132 Doxyfile Makefile popt.pc popt.spec test-poptrc
133 auto/Makefile auto/desc auto/types