Doc.
[rsync/rsync.git] / popt-1.2 / configure.in
CommitLineData
62402cb1
MP
1AC_INIT(popt.h)
2AM_INIT_AUTOMAKE(popt, 1.2)
3AM_CONFIG_HEADER(config.h)
4
5AC_PROG_CC
6AC_GCC_TRADITIONAL
7AM_C_PROTOTYPES
8
9AC_PROG_RANLIB
10AC_PROG_INSTALL
11
12if test $CC = gcc; then
13 CFLAGS="-Wall $CFLAGS"
14fi
15addlib() {
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
24dnl
25dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
26dnl requires gcc). If it's not, don't rebuild dependencies -- use what was
27dnl shipped with RPM.
28dnl
29if test X"$GCC" = Xyes ; then
30 TARGET="depend allprogs"
31else
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
38fi
39AC_SUBST(TARGET)
40
41AC_CHECK_HEADERS(unistd.h alloca.h libintl.h)
42AC_MSG_CHECKING(for /usr/ucblib in LIBS)
43if 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)
51else
52 AC_MSG_RESULT(no)
53fi
54
55AC_CHECK_FUNCS(strerror)
56AC_CHECK_FUNCS(gettext)
57AC_CHECK_FUNCS(dgettext)
58AC_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
62AC_OUTPUT([Makefile po/Makefile.in],
63 [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])