1 | AC_INIT(popt.h) |
---|
2 | AM_CONFIG_HEADER(config.h) |
---|
3 | AC_PREREQ(2.12) |
---|
4 | AC_CANONICAL_SYSTEM |
---|
5 | AM_INIT_AUTOMAKE(popt, 1.6) |
---|
6 | ALL_LINGUAS="cs da de es fi fr gl hu id is it ja ko no pl pt pt_BR ro ru sk sl sr sv tr uk wa zh zh_CN.GB2312" |
---|
7 | |
---|
8 | AC_ISC_POSIX |
---|
9 | |
---|
10 | AC_PROG_CC |
---|
11 | AC_GCC_TRADITIONAL |
---|
12 | AM_C_PROTOTYPES |
---|
13 | |
---|
14 | dnl AM_DISABLE_SHARED |
---|
15 | AM_PROG_LIBTOOL |
---|
16 | |
---|
17 | AC_PROG_INSTALL |
---|
18 | |
---|
19 | if test "X$CC" = Xgcc; then |
---|
20 | CFLAGS="-Wall $CFLAGS" |
---|
21 | fi |
---|
22 | |
---|
23 | dnl XXX lose rpm libs |
---|
24 | LIBS= |
---|
25 | addlib() { |
---|
26 | l=$1 |
---|
27 | shift |
---|
28 | case "$target" in |
---|
29 | *-*-solaris*) LIBS="$LIBS -L$l -R $l $*";; |
---|
30 | *) LIBS="$LIBS -L$l $*";; |
---|
31 | esac |
---|
32 | } |
---|
33 | |
---|
34 | dnl |
---|
35 | dnl if CC is gcc, we can rebuild the dependencies (since the depend rule |
---|
36 | dnl requires gcc). If it's not, don't rebuild dependencies -- use what was |
---|
37 | dnl shipped with RPM. |
---|
38 | dnl |
---|
39 | if test X"$GCC" = "Xyes" ; then |
---|
40 | TARGET="depend allprogs" |
---|
41 | else |
---|
42 | TARGET="everything" |
---|
43 | # |
---|
44 | # let the Makefile know that we're done with `depend', since we don't |
---|
45 | # have gcc we're not going to rebuild our dependencies at all. |
---|
46 | # |
---|
47 | echo > .depend-done |
---|
48 | fi |
---|
49 | AC_SUBST(TARGET) |
---|
50 | |
---|
51 | AC_CHECK_HEADERS(alloca.h libintl.h mcheck.h unistd.h) |
---|
52 | AC_MSG_CHECKING(for /usr/ucblib in LIBS) |
---|
53 | if test -d /usr/ucblib ; then |
---|
54 | if test "$build" = "mips-sni-sysv4" ; then |
---|
55 | addlib /usr/ccs/lib -lc |
---|
56 | fi |
---|
57 | |
---|
58 | addlib /usr/ucblib |
---|
59 | |
---|
60 | AC_MSG_RESULT(yes) |
---|
61 | else |
---|
62 | AC_MSG_RESULT(no) |
---|
63 | fi |
---|
64 | |
---|
65 | if test ! -f ../rpm.c |
---|
66 | then |
---|
67 | AC_MSG_CHECKING(for GNU xgettext) |
---|
68 | xgettext --version 2>&1 | grep 'GNU gettext' >/dev/null 2>&1 || AC_MSG_ERROR([ |
---|
69 | *** GNU gettext is required. The latest version |
---|
70 | *** is always available from ftp://ftp.gnu.org/gnu/gettext/.]) |
---|
71 | AC_MSG_RESULT(yes) |
---|
72 | fi |
---|
73 | |
---|
74 | AC_CHECK_FUNCS(strerror mtrace) |
---|
75 | dnl AC_CHECK_FUNCS(gettext) |
---|
76 | dnl AC_CHECK_FUNCS(dgettext) |
---|
77 | AC_CHECK_FUNC(setreuid, [], [ |
---|
78 | AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi]) |
---|
79 | ]) |
---|
80 | |
---|
81 | AM_GNU_GETTEXT |
---|
82 | |
---|
83 | POPT_SOURCE_PATH="`pwd`" |
---|
84 | AC_DEFINE_UNQUOTED(POPT_SOURCE_PATH, "$POPT_SOURCE_PATH") |
---|
85 | AC_SUBST(POPT_SOURCE_PATH) |
---|
86 | |
---|
87 | AC_OUTPUT([Doxyfile Makefile intl/Makefile po/Makefile.in], |
---|
88 | [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) |
---|