Commit | Line | Data |
---|---|---|
62402cb1 MP |
1 | AC_INIT(popt.h) |
2 | AM_INIT_AUTOMAKE(popt, 1.2) | |
3 | AM_CONFIG_HEADER(config.h) | |
4 | ||
5 | AC_PROG_CC | |
6 | AC_GCC_TRADITIONAL | |
7 | AM_C_PROTOTYPES | |
8 | ||
9 | AC_PROG_RANLIB | |
10 | AC_PROG_INSTALL | |
11 | ||
12 | if test $CC = gcc; then | |
13 | CFLAGS="-Wall $CFLAGS" | |
14 | fi | |
15 | addlib() { | |
16 | l=$1 | |
17 | shift | |
18 | case "$target" in | |
19 | *-*-solaris*) LIBS="$LIBS -L$l -R $l $*";; | |
20 | *) LIBS="$LIBS -L$l $*";; | |
21 | esac | |
22 | } | |
23 | ||
24 | dnl | |
25 | dnl if CC is gcc, we can rebuild the dependencies (since the depend rule | |
26 | dnl requires gcc). If it's not, don't rebuild dependencies -- use what was | |
27 | dnl shipped with RPM. | |
28 | dnl | |
29 | if test X"$GCC" = Xyes ; then | |
30 | TARGET="depend allprogs" | |
31 | else | |
32 | TARGET="everything" | |
33 | # | |
34 | # let the Makefile know that we're done with `depend', since we don't | |
35 | # have gcc we're not going to rebuild our dependencies at all. | |
36 | # | |
37 | echo > .depend-done | |
38 | fi | |
39 | AC_SUBST(TARGET) | |
40 | ||
41 | AC_CHECK_HEADERS(unistd.h alloca.h libintl.h) | |
42 | AC_MSG_CHECKING(for /usr/ucblib in LIBS) | |
43 | if test -d /usr/ucblib ; then | |
44 | if test "$build" = "mips-sni-sysv4" ; then | |
45 | addlib /usr/ccs/lib -lc | |
46 | fi | |
47 | ||
48 | addlib /usr/ucblib | |
49 | ||
50 | AC_MSG_RESULT(yes) | |
51 | else | |
52 | AC_MSG_RESULT(no) | |
53 | fi | |
54 | ||
55 | AC_CHECK_FUNCS(strerror) | |
56 | AC_CHECK_FUNCS(gettext) | |
57 | AC_CHECK_FUNCS(dgettext) | |
58 | AC_CHECK_FUNC(setreuid, [], [ | |
59 | AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi]) | |
60 | ]) | |
61 | ||
62 | AC_OUTPUT([Makefile po/Makefile.in], | |
63 | [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) |