summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorhpa <hpa>2001-07-10 04:52:06 +0000
committerhpa <hpa>2001-07-10 04:52:06 +0000
commit20271a4c874ab47a08fb96d4de82c53b9ba4e418 (patch)
tree572aa25f1f119584bd7c1b9368f9a6a11ae1ebf3 /configure.in
parent4d0dd611aed4c0340d0a5bdf433dc12872788452 (diff)
downloadtftp-hpa-20271a4c874ab47a08fb96d4de82c53b9ba4e418.tar.gz
Initial step in integrating regex-based rewrite engine.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in27
1 files changed, 19 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 4537a59..5a2a486 100644
--- a/configure.in
+++ b/configure.in
@@ -19,10 +19,20 @@ PA_WITH_BOOL(tcpwrappers, 1,
[
AC_SEARCH_LIBS(yp_get_default_domain, [nsl resolv])
PA_HAVE_TCPWRAPPERS
-],
+],:)
+
+PA_WITH_BOOL(remap, 1,
+[ --without-remap Disable regex-based filename remapping],
[
- :
-])
+ AC_CHECK_HEADER(regex.h,
+ [
+ AC_SEARCH_LIBS(regcomp, [regex rx],
+ [
+ AC_DEFINE(WITH_REGEX)
+ TFTPDOBJS="remap.o $TFTPDOBJS"
+ ])
+ ])
+],:)
PA_ADD_CFLAGS(-Wall)
PA_ADD_CFLAGS(-W)
@@ -39,17 +49,18 @@ PA_ADD_CFLAGS(-pipe)
PA_SIGSETJMP([AC_DEFINE(HAVE_SIGSETJMP)])
-LIBXTRA=0
+LIBXTRA=false
-AC_SEARCH_LIBS(xmalloc, iberty, , LIBXTRA=1 LIBOBJS="$LIBOBJS xmalloc.o")
-AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=1 LIBOBJS="$LIBOBJS xstrdup.o")
-AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=1 LIBOBJS="$LIBOBJS bsdsignal.o")
+AC_SEARCH_LIBS(xmalloc, iberty, , LIBXTRA=true LIBOBJS="$LIBOBJS xmalloc.o")
+AC_SEARCH_LIBS(xstrdup, iberty, , LIBXTRA=true LIBOBJS="$LIBOBJS xstrdup.o")
+AC_SEARCH_LIBS(bsd_signal, bsd, , LIBXTRA=true LIBOBJS="$LIBOBJS bsdsignal.o")
-if test "$LIBXTRA" -eq 1; then
+if $LIBXTRA; then
LIBS="../lib/libxtra.a $LIBS"
fi
AC_SUBST(LIBOBJS)
+AC_SUBST(TFTPDOBJS)
AC_PROG_RANLIB
AC_PROG_INSTALL