summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2006-08-17 00:57:52 +0000
committerRuss Allbery <rra@stanford.edu>2006-08-17 00:57:52 +0000
commitdd4c190db94cc0e552683bd850b2dab4807ce1e0 (patch)
treea2b48b54c41ecf46e50dc95332335c08da1678b8
parent5e40b5b6941eca139927ac6d999d996caa53e795 (diff)
Split AFS headers and AFS libraries into different configure options, since
the AFS stuff can be in very odd places. Search for res_search, since the AFS libraries require it.
-rw-r--r--configure.ac19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 90c5e4f..c0fc28c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,15 +14,20 @@ AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AFS_CPPFLAGS=
-AFS_LDFLAGS=
-AC_ARG_WITH([afs],
- AC_HELP_STRING([--with-afs=DIR],
- [Prefix for AFS headers and libraries (for kasetkey)]),
+AC_ARG_WITH([afs-headers],
+ AC_HELP_STRING([--with-afs-headers=DIR],
+ [Prefix for AFS headers (for kasetkey)]),
[if test x"$withval" != xno ; then
- AFS_CPPFLAGS="-I${withval}/include"
- AFS_LDFLAGS="-L${withval}/lib"
+ AFS_CPPFLAGS="-I${withval}"
fi])
AC_SUBST([AFS_CPPFLAGS])
+AFS_LDFLAGS=
+AC_ARG_WITH([afs-libs],
+ AC_HELP_STRING([--with-afs-libs=DIR],
+ [Prefix for AFS libraries (for kasetkey)]),
+ [if test x"$withval" != xno ; then
+ AFS_LDFLAGS="-L${withval}"
+ fi])
AC_SUBST([AFS_LDFLAGS])
AC_PROG_CC
@@ -32,6 +37,8 @@ AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([socket], [socket], ,
[AC_CHECK_LIB([nsl], [socket],
[LIBS="-lnsl -lsocket $LIBS"], , [-lsocket])])
+AC_SEARCH_LIBS([res_search], [resolv], ,
+ [AC_SEARCH_LIBS([__res_search], [resolv])])
AC_CONFIG_HEADER([config.h])
AC_OUTPUT([Makefile])