diff --git a/cmulocal/README.andrew b/cmulocal/README.andrew index 9f6eef268f..1ad5a5079b 100644 --- a/cmulocal/README.andrew +++ b/cmulocal/README.andrew @@ -1,12 +1,5 @@ This is a collection of autoconf macros which've been written by -various people at CMU. To use it, use "aclocal -I cmulocal" (after -the first time, automake should automatically use the -I cmulocal, if -you've called CMU_INIT_AUTOMAKE in configure.ac). - -CMU_INIT_AUTOMAKE - If you use automake, you should call this after AM_INIT_AUTOMAKE. - It adds "-I cmulocal" to the aclocal command line, so that when - automake runs aclocal, aclocal'll continue to pick up these macros. +various people at CMU. To use it, use "aclocal -I cmulocal". CMU_ADD_LIBPATH Add -L(arg), and possibly -R(arg) (or whatever the runpath is) to @@ -17,55 +10,3 @@ CMU_ADD_LIBPATH_TO CMU_GUESS_RUNPATH_SWITCH Attempts to guess what the runpath switch is (-R or whatever). - -CMU_COMERR - Requires that com_err exist in the collection (at CMU, do this by - running "cvs checkout com_err", and adding com_err to DIST_SUBDIRS - in your Makefile.am). - - It sets the output variable COMPILE_ET to the compile_et program to - use, and adds the appropriate paths to LDFLAGS and CPPFLAGS. - - It does *not* add -lcom_err to LIBS (this would cause later library - checks to fail if com_err needs to be built), so Makefiles need to - explicitly add -lcom_err (which, after all, should always exist as - long as the com_err compile doesn't blow up). Makefiles should do - this by using LIB_COMERR, which will substitute to the appropriate - magic to use to grab the library. (This may involve a libtool archive; - you should be using libtool to link your program if you distribute - libraries with it that the program may link against). - - Note that com_err will only be compiled if the configure script - can't find compile_et or libcom_err; if the system already has them, - the configure script will use the system installation (although, due - to some autoconf wonkiness, com_err will still be configured; it just - won't show up in the @subdirs@ expansion). - -CMU_NANA - Adds --with-nana, set by default; if set, attempts to link against - libnana. If not set, or if libnana is unavailable, or if we're not - using gcc, it defines WITHOUT_NANA. - -CMU_PROG_LIBTOOL - Just like AM_PROG_LIBTOOL, except it performs a couple little hacks - to make sure that things don't break on picky vendor compilers - which whine about empty translation units. [DEPRECATED - DO NOT USE] - -CMU_PTHREADS - This attempts to link against libpthread (failing if it can't be found), - and attempts to do any system-specific setup required for thread - support (for example, most things want _REENTRANT to be defined, - but Solaris wants _POSIX_PTHREAD_SEMANTICS and __EXTENSIONS__, IRIX - wants to see _SGI_REENTRANT_FUNCTIONS, etc). - -CMU_SASL - This tries to find a SASL library, and calls AC_SUBST on LIB_SASL - if it finds one, or tells the user to go ftp it if it doesn't exist. - - Provides --with-sasldir. - -CMU_KRB5 - This attempts to find Kerberos 5 libraries and set up CFLAGS and LIBS - appropriately. It also updates and substitutes RPATH for shared library - stuff. - diff --git a/cmulocal/afs.m4 b/cmulocal/afs.m4 deleted file mode 100644 index df53a6313e..0000000000 --- a/cmulocal/afs.m4 +++ /dev/null @@ -1,313 +0,0 @@ -dnl afs.m4--AFS libraries, includes, and dependencies -dnl Chaskiel Grundman -dnl based on kerberos_v4.m4 -dnl Derrick Brashear -dnl from KTH krb and Arla - -AC_DEFUN([CMU_AFS_INC_WHERE1], [ -cmu_save_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$cmu_save_CPPFLAGS -I$1" -AC_TRY_COMPILE([#include ], -[#ifndef SYS_NAME -choke me -#endif -int foo;], -ac_cv_found_afs_inc=yes, -ac_cv_found_afs_inc=no) -CPPFLAGS=$cmu_save_CPPFLAGS -]) - -AC_DEFUN([CMU_AFS_LIB_WHERE1], [ -save_LIBS="$LIBS" -save_LDFLAGS="$LDFLAGS" - -LIBS="-lauth $1/afs/util.a $LIB_SOCKET $LIBS" -LDFLAGS="-L$1 -L$1/afs $LDFLAGS" -dnl suppress caching -AC_TRY_LINK([],[afsconf_Open();], ac_cv_found_afs_lib=yes, ac_cv_found_afs_lib=no) -LIBS="$save_LIBS" -LDFLAGS="$save_LDFLAGS" -]) - -AC_DEFUN([CMU_AFS_WHERE], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) - for i in $1; do - AC_MSG_CHECKING(for AFS in $i) - CMU_AFS_INC_WHERE1("$i/include") - ac_cv_found_lwp_inc=$ac_cv_found_afs_inc - CMU_TEST_INCPATH($i/include, lwp) - ac_cv_found_afs_inc=$ac_cv_found_lwp_inc - if test "$ac_cv_found_afs_inc" = "yes"; then - CMU_AFS_LIB_WHERE1("$i/$CMU_LIB_SUBDIR") - if test "$ac_cv_found_afs_lib" = "yes"; then - ac_cv_afs_where=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_AFS], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_REQUIRE([CMU_SOCKETS]) -AC_REQUIRE([CMU_LIBSSL]) -AC_ARG_WITH(AFS, - [AS_HELP_STRING([--with-afs=PREFIX], [Compile with AFS support])], - [if test "X$with_AFS" = "X"; then - with_AFS=yes - fi]) - - if test "X$with_AFS" != "X"; then - ac_cv_afs_where=$with_AFS - fi - if test "X$ac_cv_afs_where" = "X"; then - CMU_AFS_WHERE(/usr/afsws /usr/local /usr/athena /Library/OpenAFS/Tools) - fi - - AC_MSG_CHECKING(whether to include AFS) - if test "X$ac_cv_afs_where" = "Xno" -o "X$ac_cv_afs_where" = "X"; then - ac_cv_found_afs=no - AC_MSG_RESULT(no) - else - ac_cv_found_afs=yes - AC_MSG_RESULT(yes) - AFS_INC_DIR="$ac_cv_afs_where/include" - AFS_LIB_DIR="$ac_cv_afs_where/$CMU_LIB_SUBDIR" - AFS_TOP_DIR="$ac_cv_afs_where" - AFS_INC_FLAGS="-I${AFS_INC_DIR}" - AFS_LIB_FLAGS="-L${AFS_LIB_DIR} -L${AFS_LIB_DIR}/afs" - cmu_save_LIBS="$LIBS" - cmu_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS ${AFS_INC_FLAGS}" - cmu_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$cmu_save_LDFLAGS ${AFS_LIB_FLAGS}" - - AC_CHECK_HEADERS(afs/stds.h) - - AC_MSG_CHECKING([if libdes is needed]) - AC_TRY_LINK([],[des_quad_cksum();],AFS_DES_LIB="",AFS_DES_LIB="maybe") - if test "X$AFS_DES_LIB" != "X"; then - LIBS="$cmu_save_LIBS -ldes" - AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="yes") - if test "X$AFS_DES_LIB" = "Xyes"; then - AC_MSG_RESULT([yes]) - AFS_LIBDES="-ldes" - AFS_LIBDESA="${AFS_LIB_DIR}/libdes.a" - else - LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS" - AC_TRY_LINK([], - [des_quad_cksum();],AFS_DES_LIB="libcrypto") - if test "X$AFS_DES_LIB" = "Xlibcrypto"; then - AC_MSG_RESULT([libcrypto]) - AFS_LIBDES="$LIBSSL_LIB_FLAGS" - AFS_LIBDESA="$LIBSSL_LIB_FLAGS" - else - LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" - AC_TRY_LINK([], - [des_quad_cksum();],AFS_DES_LIB="libcrypto+descompat") - if test "X$AFS_DES_LIB" = "Xlibcrypto+descompat"; then - AC_MSG_RESULT([libcrypto+descompat]) - AFS_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" - AFS_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" - else - AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([Could not use -ldes]) - fi - fi - fi - else - AC_MSG_RESULT([no]) - fi - - - AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a" - AFS_KTC_LIBS_STATIC="${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a" - AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a" - AFS_RX_LIBS="-lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a" - AFS_KTC_LIBS="-lauth ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcom_err ${AFS_LIB_DIR}/afs/util.a" - - LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}" - AC_CHECK_FUNC(des_pcbc_init) - if test "X$ac_cv_func_des_pcbc_init" != "Xyes"; then - AC_CHECK_LIB(descompat, des_pcbc_init, AFS_DESCOMPAT_LIB="-ldescompat") - if test "X$AFS_DESCOMPAT_LIB" != "X" ; then - AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_DESCOMPAT_LIB" - AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_DESCOMPAT_LIB" - AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_DESCOMPAT_LIB" - AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_DESCOMPAT_LIB" - else - - AC_MSG_CHECKING([if rxkad needs des_pcbc_init]) - AC_TRY_LINK(,[tkt_DecodeTicket();],RXKAD_PROBLEM=no,RXKAD_PROBLEM=maybe) - if test "$RXKAD_PROBLEM" = "maybe"; then - AC_TRY_LINK([int des_pcbc_init() { return 0;}], - [tkt_DecodeTicket();],RXKAD_PROBLEM=yes,RXKAD_PROBLEM=error) - if test "$RXKAD_PROBLEM" = "yes"; then - AC_MSG_RESULT([yes]) - AC_MSG_ERROR([cannot use rxkad]) - else - AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([Unknown error testing rxkad]) - fi - else - AC_MSG_RESULT([no]) - fi - fi - fi - - LIBS="$cmu_save_LIBS" - AC_CHECK_FUNC(flock) - LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}" - if test "X$ac_cv_func_flock" != "Xyes"; then - AC_MSG_CHECKING([if AFS needs flock]) - AC_TRY_LINK([#include -#ifdef HAVE_AFS_STDS_H -#include -#endif -#include -#include -#include -#include -struct ubik_client * cstruct; -int sigvec() {return 0;} -extern int UV_SetSecurity();], - [vsu_ClientInit(1,"","",0, - &cstruct,UV_SetSecurity)], - AFS_FLOCK=no,AFS_FLOCK=yes) - if test $AFS_FLOCK = "no"; then - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - LDFLAGS="$LDFLAGS -L/usr/ucblib" - AC_CHECK_LIB(ucb, flock,:, [AC_CHECK_LIB(BSD, flock)]) - fi - fi - LIBS="$cmu_save_LIBS" - AC_CHECK_FUNC(sigvec) - LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}" - if test "X$ac_cv_func_sigvec" != "Xyes"; then - AC_MSG_CHECKING([if AFS needs sigvec]) - AC_TRY_LINK([#include -#ifdef HAVE_AFS_STDS_H -#include -#endif -#include -#include -#include -#include -struct ubik_client * cstruct; -int flock() {return 0;} -extern int UV_SetSecurity();], - [vsu_ClientInit(1,"","",0, - &cstruct,UV_SetSecurity)], - AFS_SIGVEC=no,AFS_SIGVEC=yes) - if test $AFS_SIGVEC = "no"; then - AC_MSG_RESULT([no]) - else - AC_MSG_RESULT([yes]) - LDFLAGS="$LDFLAGS -L/usr/ucblib" - AC_CHECK_LIB(ucb, sigvec,:,[AC_CHECK_LIB(BSD, sigvec)]) - fi - fi - if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then - AFS_LIB_FLAGS="${AFS_LIB_FLAGS} -L/usr/ucblib -R/usr/ucblib" - fi - if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then - AFS_BSD_LIB="-lucb" - elif test "$ac_cv_lib_BSD_flock" = "yes" -o "$ac_cv_lib_BSD_sigvec" = "yes"; then - AFS_BSD_LIB="-lBSD" - fi - if test "X$AFS_BSD_LIB" != "X" ; then - AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_BSD_LIB" - AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_BSD_LIB" - AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB" - AFS_RX_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB" - AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_BSD_LIB" - fi - - AC_MSG_CHECKING([if libaudit is needed]) - AFS_LIBAUDIT="" - LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}" - AC_TRY_LINK([#include -#ifdef HAVE_AFS_STDS_H -#include -#endif -#include -#include ], - [afsconf_SuperUser();],AFS_AUDIT_LIB="",AFS_AUDIT_LIB="maybe") - if test "X$AFS_AUDIT_LIB" != "X"; then - LIBS="$cmu_save_LIBS -lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB $LIB_SOCKET" - AC_TRY_LINK([#include -#ifdef HAVE_AFS_STDS_H -#include -#endif -#include -#include ], - [afsconf_SuperUser();],AFS_AUDIT_LIB="yes") - if test "X$AFS_AUDIT_LIB" = "Xyes"; then - AC_MSG_RESULT([yes]) - AFS_LIBAUDIT="-laudit" - AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libaudit.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a" - AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB" - AFS_RX_LIBS="-lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB" - else - AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([Could not use -lauth while testing for -laudit]) - fi - else - AC_MSG_RESULT([no]) - fi - - AC_CHECK_FUNCS(VL_ProbeServer) - AC_MSG_CHECKING([if new-style afs_ integer types are defined]) - AC_CACHE_VAL(ac_cv_afs_int32, -dnl The next few lines contain a quoted argument to egrep -dnl It is critical that there be no leading or trailing whitespace -dnl or newlines -[AC_EGREP_CPP(dnl -changequote(<<,>>)dnl -<<(^|[^a-zA-Z_0-9])afs_int32[^a-zA-Z_0-9]>>dnl -changequote([,]), [#include -#ifdef HAVE_AFS_STDS_H -#include -#endif], -ac_cv_afs_int32=yes, ac_cv_afs_int32=no)]) - AC_MSG_RESULT($ac_cv_afs_int32) - if test $ac_cv_afs_int32 = yes ; then - AC_DEFINE(HAVE_AFS_INT32,, [AFS provides new "unambiguous" type names]) - else - AC_DEFINE(afs_int16, int16, [it's a type definition]) - AC_DEFINE(afs_int32, int32, [it's a type definition]) - AC_DEFINE(afs_uint16, u_int16, [it's a type definition]) - AC_DEFINE(afs_uint32, u_int32, [it's a type definition]) - fi - - CPPFLAGS="${cmu_save_CPPFLAGS}" - LDFLAGS="${cmu_save_LDFLAGS}" - LIBS="${cmu_save_LIBS}" - AC_DEFINE(AFS_ENV,, [Use AFS. (find what needs this and nuke it)]) - AC_DEFINE(AFS,, [Use AFS. (find what needs this and nuke it)]) - AC_SUBST(AFS_CLIENT_LIBS_STATIC) - AC_SUBST(AFS_KTC_LIBS_STATIC) - AC_SUBST(AFS_CLIENT_LIBS) - AC_SUBST(AFS_RX_LIBS) - AC_SUBST(AFS_KTC_LIBS) - AC_SUBST(AFS_INC_FLAGS) - AC_SUBST(AFS_LIB_FLAGS) - AC_SUBST(AFS_TOP_DIR) - AC_SUBST(AFS_LIBAUDIT) - AC_SUBST(AFS_LIBDES) - AC_SUBST(AFS_LIBDESA) - fi - ]) - -AC_DEFUN([CMU_NEEDS_AFS], -[AC_REQUIRE([CMU_AFS]) -if test "$ac_cv_found_afs" != "yes"; then - AC_MSG_ERROR([Cannot continue without AFS]) -fi]) diff --git a/cmulocal/agentx.m4 b/cmulocal/agentx.m4 deleted file mode 100644 index 677c353e97..0000000000 --- a/cmulocal/agentx.m4 +++ /dev/null @@ -1,45 +0,0 @@ -dnl agentx.m4--detect agentx libraries -dnl copied from x-unixrc -dnl Tim Martin - -AC_DEFUN([CMU_AGENTX], [ - - dnl - dnl CMU AgentX - dnl - AC_MSG_CHECKING([for AgentX]) - AC_ARG_WITH(agentx, - [AS_HELP_STRING([--with-agentx], [CMU AgentX libraries located in (val)])], - AGENTX_DIR="$withval", AGENTX_DIR=no) - - found_agentx="no" - - if test "${AGENTX_DIR}" != "no" && - test -f $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a && - test -f $AGENTX_DIR/include/agentx.h; then - AGENTX_DIR="$AGENTX_DIR" - found_agentx="yes" - elif test -d /usr/local && - test -f /usr/local/lib${ABILIBDIR}/libagentx.a && - test -f /usr/local/include/agentx.h; then - AGENTX_DIR="/usr/local" - found_agentx="yes" - - elif test -d /usr/ng && - test -f /usr/ng/lib${ABILIBDIR}/libagentx.a && - test -f /usr/ng/include/agentx.h; then - AGENTX_DIR="/usr/ng" - found_agentx="yes" - fi - - if test "$found_agentx" = "no"; then - AC_MSG_WARN([Could not locate AgentX Libraries! http://www.net.cmu.edu/groups/netdev/agentx/]) - else - LIB_AGENTX="-L$AGENTX_DIR/lib${ABILIBDIR} -lagentx" - AC_SUBST(LIB_AGENTX) - AGENTXFLAGS="-I$AGENTX_DIR/include" - AC_SUBST(AGENTXFLAGS) - AC_MSG_RESULT([found $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a]) - fi - -]) diff --git a/cmulocal/com_err.m4 b/cmulocal/com_err.m4 deleted file mode 100644 index b40fcd1ec1..0000000000 --- a/cmulocal/com_err.m4 +++ /dev/null @@ -1,27 +0,0 @@ -dnl com_err.m4--com_err detection macro -dnl Rob Earhart - -AC_DEFUN([CMU_COMERR], [ - cmu_need_compile_et=no - AC_CHECK_PROGS(COMPILE_ET, compile_et, no) - if test "$COMPILE_ET" = no; then - COMPILE_ET="\$(top_builddir)/com_err/compile_et" - cmu_need_to_compile_com_err=yes - fi - AC_CHECK_HEADER(com_err.h,,CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/com_err") - cmu_save_LIBS="$LIBS" - AC_CHECK_LIB(com_err, com_err, - LIB_COMERR="-lcom_err", - LDFLAGS="$LDFLAGS -L`pwd`/com_err" - LIB_COMERR="\$(top_builddir)/com_err/libcom_err.la" - cmu_need_to_compile_com_err=yes) - AC_SUBST(LIB_COMERR) - LIBS="$cmu_save_LIBS" - AC_MSG_CHECKING(whether we need to compile com_err) - if test "$cmu_need_to_compile_com_err" = yes; then - AC_MSG_RESULT(yes) - AC_CONFIG_SUBDIRS(com_err) - else - AC_MSG_RESULT(no) - fi - ]) diff --git a/cmulocal/com_err_link.m4 b/cmulocal/com_err_link.m4 deleted file mode 100644 index a8ba56e145..0000000000 --- a/cmulocal/com_err_link.m4 +++ /dev/null @@ -1,156 +0,0 @@ -dnl damnit, i don't want to figure out if I need to build an integral com_err -dnl library with the collection, I just want to know where it's installed, -dnl so don't bitch, Rob... -dnl Derrick Brashear - - -AC_DEFUN([CMU_COMERR_INC_WHERE1], [ -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$saved_CPPFLAGS -I$1" -AC_TRY_COMPILE([#include ], -[int foo;], -ac_cv_found_com_err_inc=yes, -ac_cv_found_com_err_inc=no) -CPPFLAGS=$saved_CPPFLAGS -]) - -AC_DEFUN([CMU_COMERR_INC_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for com_err headers in $i) - CMU_COMERR_INC_WHERE1($i) - CMU_TEST_INCPATH($i, com_err) - if test "$ac_cv_found_com_err_inc" = "yes"; then - ac_cv_comerr_where_inc=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -# -# Test for lib files -# - -AC_DEFUN([CMU_COMERR_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lcom_err" -AC_TRY_LINK(, -[com_err();], -[ac_cv_found_com_err_lib=yes], -ac_cv_found_com_err_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_COMERR_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for com_err libraries in $i) - CMU_COMERR_LIB_WHERE1($i) - CMU_TEST_LIBPATH($i, com_err) - if test "$ac_cv_found_com_err_lib" = "yes" ; then - ac_cv_comerr_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_USE_COMERR], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_ARG_WITH(comerr, - [AS_HELP_STRING([--with-comerr=PREFIX], [Compile with com_err support])], - [if test "X$with_comerr" = "X"; then - with_comerr=yes - fi]) -AC_ARG_WITH(comerr-lib, - [AS_HELP_STRING([--with-comerr-lib=DIR], [use com_err libraries in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-comerr-lib]) - fi]) -AC_ARG_WITH(comerr-include, - [AS_HELP_STRING([--with-comerr-include=DIR], [use com_err headers in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-comerr-include]) - fi]) - - if test "X$with_comerr" != "X"; then - if test "$with_comerr" != "yes"; then - ac_cv_comerr_where_lib=$with_comerr/$CMU_LIB_SUBDIR - ac_cv_comerr_where_inc=$with_comerr/include - fi - fi - - if test "X$with_comerr_lib" != "X"; then - ac_cv_comerr_where_lib=$with_comerr_lib - fi - if test "X$ac_cv_comerr_where_lib" = "X"; then - CMU_COMERR_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) - fi - - if test "X$with_comerr_include" != "X"; then - ac_cv_comerr_where_inc=$with_comerr_include - fi - if test "X$ac_cv_comerr_where_inc" = "X"; then - CMU_COMERR_INC_WHERE(/usr/athena/include /usr/local/include) - fi - - AC_MSG_CHECKING(whether to include com_err) - if test "X$ac_cv_comerr_where_lib" = "X" -a "X$ac_cv_comerr_where_inc" = "X"; then - ac_cv_found_com_err=no - AC_MSG_RESULT(no) - else - ac_cv_found_com_err=yes - AC_MSG_RESULT(yes) - COMERR_INC_DIR=$ac_cv_comerr_where_inc - COMERR_LIB_DIR=$ac_cv_comerr_where_lib - test "$COMERR_INC_DIR" && COMERR_INC_FLAGS="-I${COMERR_INC_DIR}" - COMERR_LIB_FLAGS="-lcom_err" - test "$COMERR_LIB_DIR" && COMERR_LIB_FLAGS="-L${COMERR_LIB_DIR} -lcom_err" - dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally - dnl Allow makefile substitutions.... - AC_SUBST(COMERR_INC_FLAGS) - AC_SUBST(COMERR_LIB_FLAGS) - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${COMERR_LIB_DIR}" - else - RPATH="${RPATH}:${COMERR_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${COMERR_LIB_DIR}" - else - RPATH="${RPATH}:${COMERR_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${COMERR_LIB_DIR}" - else - RPATH="${RPATH}:${COMERR_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${COMERR_LIB_DIR}" - else - RPATH="${RPATH}:${COMERR_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${COMERR_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - ]) - diff --git a/cmulocal/common.m4 b/cmulocal/common.m4 index 51cdcd806d..bbd7ce0c0a 100644 --- a/cmulocal/common.m4 +++ b/cmulocal/common.m4 @@ -1,42 +1,3 @@ -AC_DEFUN([CMU_TEST_LIBPATH], [ -changequote(<<, >>) -define(<>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>)) -changequote([, ]) -if test "$CMU_AC_CV_FOUND" = "yes"; then - if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl" -a \! -r "$1/lib$2.dylib"; then - CMU_AC_CV_FOUND=no - fi -fi -]) - -AC_DEFUN([CMU_TEST_INCPATH], [ -changequote(<<, >>) -define(<>, translit(ac_cv_found_$2_inc, [ *], [_p])) -changequote([, ]) -if test "$CMU_AC_CV_FOUND" = "yes"; then - if test \! -r "$1/$2.h"; then - CMU_AC_CV_FOUND=no - fi -fi -]) - -dnl CMU_CHECK_HEADER_NOCACHE(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -AC_DEFUN([CMU_CHECK_HEADER_NOCACHE], -[dnl Do the transliteration at runtime so arg 1 can be a shell variable. -ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING([for $1]) -AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes", - eval "ac_cv_header_$ac_safe=no") -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) -ifelse([$3], , , [$3 -])dnl -fi -]) - AC_DEFUN([CMU_FIND_LIB_SUBDIR], [dnl AC_ARG_WITH([lib-subdir], AC_HELP_STRING([--with-lib-subdir=DIR],[Find libraries in DIR instead of lib])) diff --git a/cmulocal/find-func-no-libs.m4 b/cmulocal/find-func-no-libs.m4 deleted file mode 100644 index 094cd9889a..0000000000 --- a/cmulocal/find-func-no-libs.m4 +++ /dev/null @@ -1,7 +0,0 @@ -dnl -dnl Look for function in any of the specified libraries -dnl - -dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args) -AC_DEFUN([AC_FIND_FUNC_NO_LIBS], [ -AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])]) diff --git a/cmulocal/find-func-no-libs2.m4 b/cmulocal/find-func-no-libs2.m4 deleted file mode 100644 index 34a9ca0b20..0000000000 --- a/cmulocal/find-func-no-libs2.m4 +++ /dev/null @@ -1,59 +0,0 @@ -dnl -dnl Look for function in any of the specified libraries -dnl - -dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args) -AC_DEFUN([AC_FIND_FUNC_NO_LIBS2], [ - -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(ac_cv_funclib_$1, -[ -if eval "test \"\$ac_cv_func_$1\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in $2; do - if test -n "$ac_lib"; then - ac_lib="-l$ac_lib" - else - ac_lib="" - fi - LIBS="$6 $ac_lib $5 $ac_save_LIBS" - AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break) - done - eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}" - LIBS="$ac_save_LIBS" -fi -]) - -eval "ac_res=\$ac_cv_funclib_$1" - -if false; then - AC_CHECK_FUNCS($1) -dnl AC_CHECK_LIBS($2, foo) -fi -# $1 -ac_tr_func=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -ac_tr_lib=HAVE_LIB_`echo $ac_res |sed 's/-l//' | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` -eval "LIB_$1=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_$1=yes" - eval "LIB_$1=" - AC_DEFINE_UNQUOTED($ac_tr_func) - AC_MSG_RESULT([yes]) - ;; - no) - eval "ac_cv_func_$1=no" - eval "LIB_$1=" - AC_MSG_RESULT([no]) - ;; - *) - eval "ac_cv_func_$1=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - AC_DEFINE_UNQUOTED($ac_tr_func) - AC_DEFINE_UNQUOTED($ac_tr_lib) - AC_MSG_RESULT([yes, in $ac_res]) - ;; -esac -AC_SUBST(LIB_$1) -]) diff --git a/cmulocal/find-func.m4 b/cmulocal/find-func.m4 deleted file mode 100644 index d52c7f4c84..0000000000 --- a/cmulocal/find-func.m4 +++ /dev/null @@ -1,7 +0,0 @@ -dnl AC_FIND_FUNC(func, libraries, includes, arguments) -AC_DEFUN([AC_FIND_FUNC], [ -AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4]) -if test -n "$LIB_$1"; then - LIBS="$LIB_$1 $LIBS" -fi -]) diff --git a/cmulocal/heimdal.m4 b/cmulocal/heimdal.m4 deleted file mode 100644 index 36ec3fc881..0000000000 --- a/cmulocal/heimdal.m4 +++ /dev/null @@ -1,196 +0,0 @@ -dnl kerberos_v5.m4--Kerberos 5 libraries and includes -dnl Derrick Brashear -dnl from KTH krb and Arla - -AC_DEFUN([CMU_LIBHEIMDAL_INC_WHERE1], [ -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$saved_CPPFLAGS -I$1" -AC_TRY_COMPILE([#include ], -[krb5_keyblock foo;], -ac_cv_found_libheimdal_inc=yes, -ac_cv_found_libheimdal_inc=no) -CPPFLAGS=$saved_CPPFLAGS -]) - -AC_DEFUN([CMU_LIBHEIMDAL_INC_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for heimdal headers in $i) - CMU_LIBHEIMDAL_INC_WHERE1($i) - CMU_TEST_INCPATH($i, krb5) - if test "$ac_cv_found_libheimdal_inc" = "yes"; then - ac_cv_libheimdal_where_inc=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -# -# Test for kerberos lib files -# - -AC_DEFUN([CMU_LIBHEIMDAL_LIB_WHERE1], [ -AC_REQUIRE([CMU_SOCKETS]) -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lkadm5clnt -lkrb5 -lasn1 -lkadm5clnt -lroken $LIB_SOCKET" -AC_TRY_LINK(, -[krb5_get_in_tkt();], -[ac_cv_found_libheimdal_lib=yes], -ac_cv_found_libheimdal_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_LIBHEIMDAL_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for heimdal libraries in $i) - CMU_LIBHEIMDAL_LIB_WHERE1($i) - CMU_TEST_LIBPATH($i, krb5) - if test "$ac_cv_found_libheimdal_lib" = "yes" ; then - ac_cv_libheimdal_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_LIBHEIMDAL_LIBDES], [ - AC_REQUIRE([CMU_LIBSSL]) - cmu_save_LIBS=$LIBS - AC_MSG_CHECKING([if libdes is needed]) - AC_TRY_LINK([],[des_quad_cksum();],HEIM_DES_LIB="",HEIM_DES_LIB="maybe") - if test "X$HEIM_DES_LIB" != "X"; then - LIBS="$cmu_save_LIBS -L$1 -ldes" - AC_TRY_LINK([], [des_quad_cksum();],HEIM_DES_LIB="yes") - if test "X$HEIM_DES_LIB" = "Xyes"; then - AC_MSG_RESULT([yes]) - HEIM_LIBDES="-ldes" - HEIM_LIBDESA="$1/libdes.a" - else - LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS" - AC_TRY_LINK([], - [des_quad_cksum();],HEIM_DES_LIB="libcrypto") - if test "X$HEIM_DES_LIB" = "Xlibcrypto"; then - AC_MSG_RESULT([libcrypto]) - HEIM_LIBDES="$LIBSSL_LIB_FLAGS" - HEIM_LIBDESA="$LIBSSL_LIB_FLAGS" - else - LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" - AC_TRY_LINK([], - [des_quad_cksum();],HEIM_DES_LIB="libcrypto+descompat") - if test "X$HEIM_DES_LIB" = "Xlibcrypto+descompat"; then - AC_MSG_RESULT([libcrypto+descompat]) - HEIM_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" - HEIM_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" - else - AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([Could not use -ldes]) - fi - fi - fi - else - AC_MSG_RESULT([no]) - fi -]) - -AC_DEFUN([CMU_LIBHEIMDAL], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_REQUIRE([CMU_SOCKETS]) -AC_REQUIRE([CMU_USE_COMERR]) -AC_ARG_WITH(LIBHEIMDAL, - [AS_HELP_STRING([--with-libheimdal=PREFIX], [Compile with Heimdal support])], - [if test "X$with_libheimdal" = "X"; then - with_libheimdal=yes - fi]) -AC_ARG_WITH(libheimdal-lib, - [AS_HELP_STRING([--with-libheimdal-lib=DIR], [use heimdal libraries in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libheimdal-lib]) - fi]) -AC_ARG_WITH(libheimdal-include, - [AS_HELP_STRING([--with-libheimdal-include=DIR], [use heimdal headers in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libheimdal-include]) - fi]) - - if test "X$with_libheimdal" != "X"; then - if test "$with_libheimdal" != "yes" -a "$with_libheimdal" != "no"; then - ac_cv_libheimdal_where_lib=$with_libheimdal/$CMU_LIB_SUBDIR - ac_cv_libheimdal_where_inc=$with_libheimdal/include - fi - fi - - if test "$with_libheimdal" != "no"; then - if test "X$with_libheimdal_lib" != "X"; then - ac_cv_libheimdal_where_lib=$with_libheimdal_lib - fi - if test "X$ac_cv_libheimdal_where_lib" = "X"; then - CMU_LIBHEIMDAL_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/heimdal/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) - fi - - if test "X$with_libheimdal_include" != "X"; then - ac_cv_libheimdal_where_inc=$with_libheimdal_include - fi - if test "X$ac_cv_libheimdal_where_inc" = "X"; then - CMU_LIBHEIMDAL_INC_WHERE(/usr/athena/include /usr/heimdal/include /usr/local/include) - fi - fi - - AC_MSG_CHECKING(whether to include heimdal) - if test "X$ac_cv_libheimdal_where_lib" = "X" -a "X$ac_cv_libheimdal_where_inc" = "X"; then - ac_cv_found_libheimdal=no - AC_MSG_RESULT(no) - else - ac_cv_found_libheimdal=yes - AC_MSG_RESULT(yes) - LIBHEIMDAL_INC_DIR=$ac_cv_libheimdal_where_inc - LIBHEIMDAL_LIB_DIR=$ac_cv_libheimdal_where_lib - CMU_LIBHEIMDAL_LIBDES($LIBHEIMDAL_LIB_DIR) - LIBHEIMDAL_INC_FLAGS="-I${LIBHEIMDAL_INC_DIR}" - LIBHEIMDAL_LIB_FLAGS="-L${LIBHEIMDAL_LIB_DIR} -lkadm5clnt -lkrb5 -lasn1 ${HEIM_LIBDES} -lroken $LIB_SOCKET" - AC_SUBST(LIBHEIMDAL_INC_FLAGS) - AC_SUBST(LIBHEIMDAL_LIB_FLAGS) - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LIBHEIMDAL_LIB_DIR}" - else - RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${LIBHEIMDAL_LIB_DIR}" - else - RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LIBHEIMDAL_LIB_DIR}" - else - RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${LIBHEIMDAL_LIB_DIR}" - else - RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${LIBHEIMDAL_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - ]) - diff --git a/cmulocal/init_automake.m4 b/cmulocal/init_automake.m4 deleted file mode 100644 index 7d9e9b01ff..0000000000 --- a/cmulocal/init_automake.m4 +++ /dev/null @@ -1,7 +0,0 @@ -dnl init_automake.m4--cmulocal automake setup macro -dnl Rob Earhart - -AC_DEFUN([CMU_INIT_AUTOMAKE], [ - AC_REQUIRE([AM_INIT_AUTOMAKE]) - ACLOCAL="$ACLOCAL -I \$(top_srcdir)/cmulocal" - ]) diff --git a/cmulocal/ipv6.m4 b/cmulocal/ipv6.m4 index 58b763a144..f856b994d2 100644 --- a/cmulocal/ipv6.m4 +++ b/cmulocal/ipv6.m4 @@ -93,19 +93,3 @@ else fi AC_MSG_RESULT($ipv6_cv_sa_len)]) - -dnl See whether sys/socket.h has socklen_t -AC_DEFUN([IPv6_CHECK_SOCKLEN_T], [ -AC_MSG_CHECKING(for socklen_t) -AC_CACHE_VAL(ipv6_cv_socklen_t, [dnl -AC_TRY_LINK([#include -#include ], - [socklen_t len = 0;], - [ipv6_cv_socklen_t=yes], [ipv6_cv_socklen_t=no])])dnl -if test $ipv6_cv_socklen_t = yes; then - ifelse([$1], , AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?]), [$1]) -else - ifelse([$2], , :, [$2]) -fi -AC_MSG_RESULT($ipv6_cv_socklen_t)]) - diff --git a/cmulocal/kerberos_v5.m4 b/cmulocal/kerberos_v5.m4 deleted file mode 100644 index 0ee91e0f19..0000000000 --- a/cmulocal/kerberos_v5.m4 +++ /dev/null @@ -1,182 +0,0 @@ -dnl kerberos_v5.m4--Kerberos 5 libraries and includes -dnl Derrick Brashear -dnl from KTH krb and Arla - -AC_DEFUN([CMU_KRB5_INC_WHERE1], [ -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$saved_CPPFLAGS -I$1" -AC_TRY_COMPILE([#include ], -[krb5_keyblock foo;], -ac_cv_found_krb5_inc=yes, -ac_cv_found_krb5_inc=no) -CPPFLAGS=$saved_CPPFLAGS -]) - -AC_DEFUN([CMU_KRB5_INC_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for krb5 headers in $i) - CMU_KRB5_INC_WHERE1($i) - CMU_TEST_INCPATH($i, krb5) - if test "$ac_cv_found_krb5_inc" = "yes"; then - ac_cv_krb5_where_inc=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -# -# Test for kerberos lib files -# - -AC_DEFUN([CMU_KRB5_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lkrb5 -lk5crypto" -AC_TRY_LINK(, -[krb5_get_in_tkt();], -[ac_cv_found_krb5_lib=yes], -ac_cv_found_krb5_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_KRB5_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for krb5 libraries in $i) - CMU_KRB5_LIB_WHERE1($i) - CMU_TEST_LIBPATH($i, krb5) - if test "$ac_cv_found_krb5_lib" = "yes" ; then - ac_cv_krb5_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_KRB5], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_REQUIRE([CMU_SOCKETS]) -AC_REQUIRE([CMU_USE_COMERR]) -AC_ARG_WITH(krb5, - [AS_HELP_STRING([--with-krb5=PREFIX], [Compile with Kerberos 5 support])], - [if test "X$with_krb5" = "X"; then - with_krb5=yes - fi]) -AC_ARG_WITH(krb5-lib, - [AS_HELP_STRING([--with-krb5-lib=DIR], [use kerberos 5 libraries in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-krb5-lib]) - fi]) -AC_ARG_WITH(krb5-include, - [AS_HELP_STRING([--with-krb5-include=DIR], [use kerberos 5 headers in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-krb5-include]) - fi]) -AC_ARG_WITH(krb5-impl, - [AS_HELP_STRING([--with-krb5-impl=heimdal/mit], [use heimdal/MIT kerberos 5 libraries])], - [if test "$withval" != "heimdal" -a "$withval" != "mit"; then - AC_MSG_ERROR([Invalid argument for --with-krb5-impl]) - fi]) - - if test "X$with_krb5" != "X"; then - if test "$with_krb5" != "yes" -a "$with_krb5" != "no"; then - ac_cv_krb5_where_lib=$with_krb5/$CMU_LIB_SUBDIR - ac_cv_krb5_where_inc=$with_krb5/include - ac_cv_krb5_impl=mit - fi - fi - - if test "$with_krb5" != "no"; then - if test "X$with_krb5_lib" != "X"; then - ac_cv_krb5_where_lib=$with_krb5_lib - ac_cv_krb5_impl=mit - fi - if test "X$with_krb5_impl" != "X"; then - ac_cv_krb5_impl=$with_krb5_impl - fi - if test "X$ac_cv_krb5_where_lib" = "X" -a "X$with_krb5_impl" != "Xheimdal"; then - CMU_KRB5_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) - if test "X$ac_cv_krb5_where_lib" != "X"; then - ac_cv_krb5_impl=mit - fi - fi - if test "X$ac_cv_krb5_where_lib" = "X" -a "X$with_krb5_impl" != "Xmit"; then - CMU_LIBHEIMDAL_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/heimdal/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) - if test "X$ac_cv_libheimdal_where_lib" != "X"; then - ac_cv_krb5_where_lib=$ac_cv_libheimdal_where_lib - ac_cv_krb5_impl=heimdal - fi - fi - - if test "X$with_krb5_include" != "X"; then - ac_cv_krb5_where_inc=$with_krb5_include - fi - if test "X$ac_cv_krb5_where_inc" = "X"; then - CMU_KRB5_INC_WHERE(/usr/athena/include /usr/include/kerberos /usr/local/include /usr/include) - fi - fi - - AC_MSG_CHECKING(whether to include kerberos 5) - if test "X$ac_cv_krb5_where_lib" = "X" -o "X$ac_cv_krb5_where_inc" = "X"; then - ac_cv_found_krb5=no - AC_MSG_RESULT(no) - else - ac_cv_found_krb5=yes - AC_MSG_RESULT(yes) - KRB5_INC_DIR=$ac_cv_krb5_where_inc - KRB5_LIB_DIR=$ac_cv_krb5_where_lib - if test "X$ac_cv_krb5_impl" != "Xheimdal"; then - KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkrb5 -lk5crypto" - else - CMU_LIBHEIMDAL_LIBDES($KRB5_LIB_DIR) - KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkadm5clnt -lkrb5 -lasn1 ${HEIM_LIBDES} -lroken $LIB_SOCKET" - AC_DEFINE(HEIMDAL,,[we found heimdal krb5 and not MIT krb5]) - fi - KRB5_INC_FLAGS="-I${KRB5_INC_DIR}" - AC_SUBST(KRB5_INC_FLAGS) - AC_SUBST(KRB5_LIB_FLAGS) - AC_DEFINE(KRB5,,[Use Kerberos 5. (maybe find what needs this and nuke it)]) - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${KRB5_LIB_DIR}" - else - RPATH="${RPATH}:${KRB5_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${KRB5_LIB_DIR}" - else - RPATH="${RPATH}:${KRB5_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${KRB5_LIB_DIR}" - else - RPATH="${RPATH}:${KRB5_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${KRB5_LIB_DIR}" - else - RPATH="${RPATH}:${KRB5_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${KRB5_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - ]) - diff --git a/cmulocal/libXau.m4 b/cmulocal/libXau.m4 deleted file mode 100644 index e4579267e8..0000000000 --- a/cmulocal/libXau.m4 +++ /dev/null @@ -1,145 +0,0 @@ -AC_DEFUN([CMU_XAU_INC_WHERE1], [ -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$saved_CPPFLAGS -I$1" -AC_TRY_COMPILE([ -#include -], -[Xauth foo;], -ac_cv_found_Xau_inc=yes, -ac_cv_found_Xau_inc=no) -CPPFLAGS=$saved_CPPFLAGS -]) - -AC_DEFUN([CMU_XAU_INC_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for Xau headers in $i) - CMU_XAU_INC_WHERE1($i) - CMU_TEST_INCPATH($i, X11/Xauth) - if test "$ac_cv_found_Xau_inc" = "yes"; then - ac_cv_Xau_where_inc=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_XAU_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lXau $LIB_SOCKET" -AC_TRY_LINK(, -[XauDisposeAuth();], -[ac_cv_found_Xau_lib=yes], -ac_cv_found_Xau_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_XAU_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for Xau libraries in $i) - CMU_XAU_LIB_WHERE1($i) - dnl deal with false positives from implicit link paths - CMU_TEST_LIBPATH($i, Xau) - if test "$ac_cv_found_Xau_lib" = "yes" ; then - ac_cv_Xau_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_XAU], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_REQUIRE([CMU_SOCKETS]) -AC_ARG_WITH(Xau, - [AS_HELP_STRING([--with-Xau=PREFIX], [Compile with Xau support])], - [if test "X$with_Xau" = "X"; then - with_Xau=yes - fi]) -AC_ARG_WITH(Xau-lib, - [AS_HELP_STRING([--with-Xau-lib=DIR], [use Xau libraries in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-Xau-lib]) - fi]) -AC_ARG_WITH(Xau-include, - [AS_HELP_STRING([--with-Xau-include=DIR], [use Xau headers in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-Xau-include]) - fi]) - - if test "X$with_Xau" != "X"; then - if test "$with_Xau" != "yes"; then - ac_cv_Xau_where_lib=$with_Xau/$CMU_LIB_SUBDIR - ac_cv_Xau_where_inc=$with_Xau/include - fi - fi - - if test "X$with_Xau_lib" != "X"; then - ac_cv_Xau_where_lib=$with_Xau_lib - fi - if test "X$ac_cv_Xau_where_lib" = "X"; then - CMU_XAU_LIB_WHERE(/usr/X11R6/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/openwin/$CMU_LIB_SUBDIR) - fi - - if test "X$with_Xau_include" != "X"; then - ac_cv_Xau_where_inc=$with_Xau_include - fi - if test "X$ac_cv_Xau_where_inc" = "X"; then - CMU_XAU_INC_WHERE(/usr/X11R6/include /usr/local/include /usr/openwin/include) - fi - - AC_MSG_CHECKING(whether to include Xau) - if test "X$ac_cv_Xau_where_lib" = "X" -a "X$ac_cv_Xau_where_inc" = "X"; then - ac_cv_found_Xau=no - AC_MSG_RESULT(no) - else - ac_cv_found_Xau=yes - AC_MSG_RESULT(yes) - XAU_INC_DIR=$ac_cv_Xau_where_inc - XAU_LIB_DIR=$ac_cv_Xau_where_lib - XAU_INC_FLAGS="-I${XAU_INC_DIR}" - XAU_LIB_FLAGS="-L${XAU_LIB_DIR} -lXau" - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${XAU_LIB_DIR}" - else - RPATH="${RPATH}:${XAU_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${XAU_LIB_DIR}" - else - RPATH="${RPATH}:${XAU_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${XAU_LIB_DIR}" - else - RPATH="${RPATH}:${XAU_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${XAU_LIB_DIR}" - else - RPATH="${RPATH}:${XAU_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${XAU_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - ]) - diff --git a/cmulocal/libcyrus.m4 b/cmulocal/libcyrus.m4 deleted file mode 100644 index b3853c0982..0000000000 --- a/cmulocal/libcyrus.m4 +++ /dev/null @@ -1,154 +0,0 @@ -dnl libcyrus.m4--Cyrus libraries and includes -dnl Derrick Brashear -dnl from KTH kafs and Arla - -AC_DEFUN([CMU_LIBCYRUS_INC_WHERE1], [ -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$saved_CPPFLAGS -I$1 $SASLFLAGS" -CMU_CHECK_HEADER_NOCACHE(cyrus/imclient.h, -ac_cv_found_cyrus_inc=yes, -ac_cv_found_cyrus_inc=no) -CPPFLAGS=$saved_CPPFLAGS -]) - -AC_DEFUN([CMU_LIBCYRUS_INC_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for libcyrus headers in $i) - CMU_LIBCYRUS_INC_WHERE1($i) - CMU_TEST_INCPATH($i, imclient) - if test "$ac_cv_found_cyrus_inc" = "yes"; then - ac_cv_cyrus_where_inc=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_LIBCYRUS_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lcyrus ${LIB_SASL} ${LIBSSL_LIB_FLAGS} ${LIB_SOCKET}" -AC_TRY_LINK([void fatal(){}], -[imclient_authenticate();], -[ac_cv_found_cyrus_lib=yes], -ac_cv_found_cyrus_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_LIBCYRUS_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for libcyrus libraries in $i) - CMU_LIBCYRUS_LIB_WHERE1($i) - dnl deal with false positives from implicit link paths - CMU_TEST_LIBPATH($i, cyrus) - if test "$ac_cv_found_cyrus_lib" = "yes" ; then - ac_cv_cyrus_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_LIBCYRUS], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_REQUIRE([CMU_SOCKETS]) -AC_REQUIRE([CMU_SASL2]) -AC_REQUIRE([CMU_LIBSSL]) -AC_ARG_WITH(libcyrus, - [AS_HELP_STRING([--with-libcyrus=PREFIX], [Compile with Libcyrus support])], - [if test "X$with_libcyrus" = "X"; then - with_libcyrus=yes - fi]) -AC_ARG_WITH(libcyrus-lib, - [AS_HELP_STRING([--with-libcyrus-lib=DIR], [use libcyrus libraries in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libcyrus-lib]) - fi]) -AC_ARG_WITH(libcyrus-include, - [AS_HELP_STRING([--with-libcyrus-include=DIR], [use libcyrus headers in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libcyrus-include]) - fi]) - - if test "X$with_libcyrus" != "X"; then - if test "$with_libcyrus" != "yes" -a "$with_libcyrus" != no; then - ac_cv_cyrus_where_lib=$with_libcyrus/$CMU_LIB_SUBDIR - ac_cv_cyrus_where_inc=$with_libcyrus/include - fi - fi - - if test "$with_libcyrus" != "no"; then - if test "X$with_libcyrus_lib" != "X"; then - ac_cv_cyrus_where_lib=$with_libcyrus_lib - fi - if test "X$ac_cv_cyrus_where_lib" = "X"; then - CMU_LIBCYRUS_LIB_WHERE(/usr/cyrus/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR) - fi - - if test "X$with_libcyrus_include" != "X"; then - ac_cv_cyrus_where_inc=$with_libcyrus_include - fi - if test "X$ac_cv_cyrus_where_inc" = "X"; then - CMU_LIBCYRUS_INC_WHERE(/usr/cyrus/include /usr/local/include /usr/local/include/cyrus /usr/include/cyrus) - fi - fi - - AC_MSG_CHECKING(whether to include libcyrus) - if test "X$ac_cv_cyrus_where_lib" = "X" -o "X$ac_cv_cyrus_where_inc" = "X"; then - ac_cv_found_cyrus=no - AC_MSG_RESULT(no) - else - ac_cv_found_cyrus=yes - AC_MSG_RESULT(yes) - LIBCYRUS_INC_DIR=$ac_cv_cyrus_where_inc - LIBCYRUS_LIB_DIR=$ac_cv_cyrus_where_lib - LIBCYRUS_INC_FLAGS="-I${LIBCYRUS_INC_DIR}" - LIBCYRUS_LIB_FLAGS="-L${LIBCYRUS_LIB_DIR} -lcyrus" - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LIBCYRUS_LIB_DIR}" - else - RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${LIBCYRUS_LIB_DIR}" - else - RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LIBCYRUS_LIB_DIR}" - else - RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${LIBCYRUS_LIB_DIR}" - else - RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${LIBCYRUS_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - AC_SUBST(LIBCYRUS_INC_DIR) - AC_SUBST(LIBCYRUS_LIB_DIR) - AC_SUBST(LIBCYRUS_INC_FLAGS) - AC_SUBST(LIBCYRUS_LIB_FLAGS) - ]) - diff --git a/cmulocal/libloguse.m4 b/cmulocal/libloguse.m4 deleted file mode 100644 index ec5c8d897a..0000000000 --- a/cmulocal/libloguse.m4 +++ /dev/null @@ -1,102 +0,0 @@ -dnl libloguse.m4--LOGUSE libraries and includes -dnl Derrick Brashear -dnl from KTH krb and Arla - -AC_DEFUN([CMU_LOGUSE_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lloguse" -AC_TRY_LINK(, -[loguse("","","");], -[ac_cv_found_loguse_lib=yes], -ac_cv_found_loguse_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_LOGUSE_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for loguse library in $i) - CMU_LOGUSE_LIB_WHERE1($i) - CMU_TEST_LIBPATH($i, loguse) - if test "$ac_cv_found_loguse_lib" = "yes" ; then - ac_cv_loguse_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(no found) - fi - done -]) - -AC_DEFUN([CMU_LOGUSE], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_REQUIRE([CMU_SOCKETS]) -AC_ARG_WITH(loguse, - [AS_HELP_STRING([--with-loguse=PREFIX], [Compile with LOGUSE support])], - [if test "X$with_loguse" = "X"; then - with_loguse=yes - fi]) - - if test "X$with_loguse" != "X"; then - if test "$with_loguse" != "yes"; then - ac_cv_loguse_where_lib=$with_loguse/$CMU_LIB_SUBDIR - fi - fi - - if test "X$with_loguse_lib" != "X"; then - ac_cv_loguse_where_lib=$with_loguse_lib - fi - if test "X$ac_cv_loguse_where_lib" = "X"; then - CMU_LOGUSE_LIB_WHERE(/usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) - fi - - AC_MSG_CHECKING(whether to include loguse) - if test "X$ac_cv_loguse_where_lib" = "X"; then - ac_cv_found_loguse=no - AC_MSG_RESULT(no) - else - ac_cv_found_loguse=yes - AC_DEFINE(HAVE_LOGUSE,, [Use libloguse]) - AC_MSG_RESULT(yes) - LOGUSE_LIB_DIR=$ac_cv_loguse_where_lib - LOGUSE_LIB_FLAGS="-L${LOGUSE_LIB_DIR} -lloguse" - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LOGUSE_LIB_DIR}" - else - RPATH="${RPATH}:${LOGUSE_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${LOGUSE_LIB_DIR}" - else - RPATH="${RPATH}:${LOGUSE_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LOGUSE_LIB_DIR}" - else - RPATH="${RPATH}:${LOGUSE_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${LOGUSE_LIB_DIR}" - else - RPATH="${RPATH}:${LOGUSE_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${LOGUSE_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - ]) - diff --git a/cmulocal/libnet.m4 b/cmulocal/libnet.m4 deleted file mode 100644 index b5cf8e4f0d..0000000000 --- a/cmulocal/libnet.m4 +++ /dev/null @@ -1,191 +0,0 @@ -dnl libnet.m4--libnet and includes -dnl Derrick Brashear -dnl from KTH krb and Arla - -AC_DEFUN([CMU_LIBNET_CFG_WHERE1], [ -ac_cv_found_libnet_bin=no -if test -f "$1/libnet-config" ; then - ac_cv_found_libnet_cfg=yes -fi -]) - -AC_DEFUN([CMU_LIBNET_CFG_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for libnet config in $i) - CMU_LIBNET_CFG_WHERE1($i) - if test "$ac_cv_found_libnet_cfg" = "yes"; then - ac_cv_libnet_where_cfg=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_LIBNET_INC_WHERE1], [ -ac_cv_found_libnet_inc=no -if test -f "$1/libnet.h" ; then - ac_cv_found_libnet_inc=yes -fi -]) - -AC_DEFUN([CMU_LIBNET_INC_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for libnet header in $i) - CMU_LIBNET_INC_WHERE1($i) - if test "$ac_cv_found_libnet_inc" = "yes"; then - ac_cv_libnet_where_inc=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_LIBNET_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lnet" -AC_TRY_LINK(, -[open_link_interface("","");], -[ac_cv_found_libnet_lib=yes], -AC_TRY_LINK(, -[libnet_open_link_interface("","");], -[ -CMU_LIBNET_CFLAGS_ADD="-DNEW_LIBNET_INTERFACE" -ac_cv_found_libnet_lib=yes -], -ac_cv_found_libnet_lib=no) -) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_LIBNET_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for libnet library in $i) - CMU_LIBNET_LIB_WHERE1($i) - CMU_TEST_LIBPATH($i, net) - if test "$ac_cv_found_libnet_lib" = "yes" ; then - ac_cv_libnet_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_LIBNET], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_ARG_WITH(libnet, - [AS_HELP_STRING([--with-libnet=PREFIX], [Compile with LIBNET support])], - [if test "X$with_libnet" = "X"; then - with_libnet=yes - fi]) -AC_ARG_WITH(libnet-config, - [AS_HELP_STRING([--with-libnet-config=DIR], [use libnet config program in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libnet-config]) - fi]) -AC_ARG_WITH(libnet-lib, - [AS_HELP_STRING([--with-libnet-lib=DIR], [use libnet libraries in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libnet-lib]) - fi]) -AC_ARG_WITH(libnet-include, - [AS_HELP_STRING([--with-libnet-include=DIR], [use libnet headers in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libnet-include]) - fi]) - - if test "X$with_libnet" != "X"; then - if test "$with_libnet" != "yes"; then - if test -f "$with_libnet/libnet-config"; then - ac_cv_libnet_where_cfg=$with_libnet - else - ac_cv_libnet_where_cfg=$with_libnet/bin - fi - ac_cv_libnet_where_lib=$with_libnet/$CMU_LIB_SUBDIR - ac_cv_libnet_where_inc=$with_libnet/include - fi - fi - - if test "X$with_libnet_cfg" != "X"; then - ac_cv_libnet_where_cfg=$with_libnet_cfg - fi - if test "X$ac_cv_libnet_where_cfg" = "X"; then - CMU_LIBNET_CFG_WHERE(/usr/ng/bin /usr/bin /usr/local/bin) - fi - - if test "X$with_libnet_lib" != "X"; then - ac_cv_libnet_where_lib=$with_libnet_lib - fi - if test "X$ac_cv_libnet_where_lib" = "X"; then - CMU_LIBNET_LIB_WHERE(/usr/ng/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) - fi - - if test "X$with_libnet_include" != "X"; then - ac_cv_libnet_where_inc=$with_libnet_include - fi - if test "X$ac_cv_libnet_where_inc" = "X"; then - CMU_LIBNET_INC_WHERE(/usr/ng/include /usr/include /usr/local/include) - fi - - AC_MSG_CHECKING(whether to include libnet) - if test "X$ac_cv_libnet_where_lib" = "X" -o "X$ac_cv_libnet_where_inc" = "X" -o "X$ac_cv_libnet_where_cfg" = "X"; then - ac_cv_found_libnet=no - AC_MSG_RESULT(no) - else - ac_cv_found_libnet=yes - AC_MSG_RESULT(yes) - LIBNET_CONFIG=$ac_cv_libnet_where_cfg/libnet-config - LIBNET_INC_DIR=$ac_cv_libnet_where_inc - LIBNET_LIB_DIR=$ac_cv_libnet_where_lib - - LIBNET_CFLAGS="`$LIBNET_CONFIG --cflags` ${CMU_LIBNET_CFLAGS_ADD}" - LIBNET_DEF_FLAGS="`$LIBNET_CONFIG --defines`" - LIBNET_INC_FLAGS="-I${LIBNET_INC_DIR}" - LIBNET_LIB_FLAGS="-L${LIBNET_LIB_DIR} `${LIBNET_CONFIG} --libs`" - - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LIBNET_LIB_DIR}" - else - RPATH="${RPATH}:${LIBNET_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${LIBNET_LIB_DIR}" - else - RPATH="${RPATH}:${LIBNET_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LIBNET_LIB_DIR}" - else - RPATH="${RPATH}:${LIBNET_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${LIBNET_LIB_DIR}" - else - RPATH="${RPATH}:${LIBNET_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${LIBNET_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - ]) - diff --git a/cmulocal/libpcap.m4 b/cmulocal/libpcap.m4 deleted file mode 100644 index ed79cc9b20..0000000000 --- a/cmulocal/libpcap.m4 +++ /dev/null @@ -1,141 +0,0 @@ -dnl libpcap.m4--PCAP libraries and includes -dnl Derrick Brashear -dnl from KTH krb and Arla - -AC_DEFUN([CMU_PCAP_INC_WHERE1], [ -ac_cv_found_pcap_inc=no -if test -f "$1/pcap.h" ; then - ac_cv_found_pcap_inc=yes -fi -]) - -AC_DEFUN([CMU_PCAP_INC_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for pcap header in $i) - CMU_PCAP_INC_WHERE1($i) - if test "$ac_cv_found_pcap_inc" = "yes"; then - ac_cv_pcap_where_inc=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(no found) - fi - done -]) - -AC_DEFUN([CMU_PCAP_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lpcap" -AC_TRY_LINK(, -[pcap_lookupdev("");], -[ac_cv_found_pcap_lib=yes], -ac_cv_found_pcap_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_PCAP_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for pcap library in $i) - CMU_PCAP_LIB_WHERE1($i) - CMU_TEST_LIBPATH($i, pcap) - if test "$ac_cv_found_pcap_lib" = "yes" ; then - ac_cv_pcap_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(no found) - fi - done -]) - -AC_DEFUN([CMU_PCAP], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_ARG_WITH(pcap, - [AS_HELP_STRING([--with-pcap=PREFIX], [Compile with PCAP support])], - [if test "X$with_pcap" = "X"; then - with_pcap=yes - fi]) -AC_ARG_WITH(pcap-lib, - [AS_HELP_STRING([--with-pcap-lib=DIR], [use pcap libraries in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-pcap-lib]) - fi]) -AC_ARG_WITH(pcap-include, - [AS_HELP_STRING([--with-pcap-include=DIR], [use pcap headers in DIR])], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-pcap-include]) - fi]) - - if test "X$with_pcap" != "X"; then - if test "$with_pcap" != "yes"; then - ac_cv_pcap_where_lib=$with_pcap/$CMU_LIB_SUBDIR - ac_cv_pcap_where_inc=$with_pcap/include - fi - fi - - if test "X$with_pcap_lib" != "X"; then - ac_cv_pcap_where_lib=$with_pcap_lib - fi - if test "X$ac_cv_pcap_where_lib" = "X"; then - CMU_PCAP_LIB_WHERE(/usr/ng/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) - fi - - if test "X$with_pcap_include" != "X"; then - ac_cv_pcap_where_inc=$with_pcap_include - fi - if test "X$ac_cv_pcap_where_inc" = "X"; then - CMU_PCAP_INC_WHERE(/usr/ng/include /usr/include /usr/local/include) - fi - - AC_MSG_CHECKING(whether to include pcap) - if test "X$ac_cv_pcap_where_lib" = "X" -a "X$ac_cv_pcap_where_inc" = "X"; then - ac_cv_found_pcap=no - AC_MSG_RESULT(no) - else - ac_cv_found_pcap=yes - AC_MSG_RESULT(yes) - PCAP_INC_DIR=$ac_cv_pcap_where_inc - PCAP_LIB_DIR=$ac_cv_pcap_where_lib - PCAP_INC_FLAGS="-I${PCAP_INC_DIR}" - PCAP_LIB_FLAGS="-L${PCAP_LIB_DIR} -lpcap" - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${PCAP_LIB_DIR}" - else - RPATH="${RPATH}:${PCAP_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${PCAP_LIB_DIR}" - else - RPATH="${RPATH}:${PCAP_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${PCAP_LIB_DIR}" - else - RPATH="${RPATH}:${PCAP_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${PCAP_LIB_DIR}" - else - RPATH="${RPATH}:${PCAP_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${PCAP_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - ]) - diff --git a/cmulocal/librestrict.m4 b/cmulocal/librestrict.m4 deleted file mode 100644 index 5e5451ec25..0000000000 --- a/cmulocal/librestrict.m4 +++ /dev/null @@ -1,101 +0,0 @@ -dnl librestrict.m4--restrict libraries and includes -dnl Derrick Brashear -dnl from KTH krb and Arla - -AC_DEFUN([CMU_RESTRICT_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lrestrict" -AC_TRY_LINK(, -[ConsoleInUse();], -[ac_cv_found_restrict_lib=yes], -ac_cv_found_restrict_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_RESTRICT_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for restrict library in $i) - CMU_RESTRICT_LIB_WHERE1($i) - CMU_TEST_LIBPATH($i, restrict) - if test "$ac_cv_found_restrict_lib" = "yes" ; then - ac_cv_restrict_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(no found) - fi - done -]) - -AC_DEFUN([CMU_RESTRICT], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_ARG_WITH(restrict, - [AS_HELP_STRING([--with-restrict=PREFIX], [Compile with RESTRICT support])], - [if test "X$with_restrict" = "X"; then - with_restrict=yes - fi]) - - if test "X$with_restrict" != "X"; then - if test "$with_restrict" != "yes"; then - ac_cv_restrict_where_lib=$with_restrict/$CMU_LIB_SUBDIR - fi - fi - - if test "X$with_restrict_lib" != "X"; then - ac_cv_restrict_where_lib=$with_restrict_lib - fi - if test "X$ac_cv_restrict_where_lib" = "X"; then - CMU_RESTRICT_LIB_WHERE(/usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) - fi - - AC_MSG_CHECKING(whether to include restrict) - if test "X$ac_cv_restrict_where_lib" = "X"; then - ac_cv_found_restrict=no - AC_MSG_RESULT(no) - else - ac_cv_found_restrict=yes - AC_DEFINE(HAVE_RESTRICT,, [Use librestrict]) - AC_MSG_RESULT(yes) - RESTRICT_LIB_DIR=$ac_cv_restrict_where_lib - RESTRICT_LIB_FLAGS="-L${RESTRICT_LIB_DIR} -lrestrict" - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${RESTRICT_LIB_DIR}" - else - RPATH="${RPATH}:${RESTRICT_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${RESTRICT_LIB_DIR}" - else - RPATH="${RPATH}:${RESTRICT_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${RESTRICT_LIB_DIR}" - else - RPATH="${RPATH}:${RESTRICT_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${RESTRICT_LIB_DIR}" - else - RPATH="${RPATH}:${RESTRICT_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${RESTRICT_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - ]) - diff --git a/cmulocal/libssl.m4 b/cmulocal/libssl.m4 deleted file mode 100644 index 730efe537c..0000000000 --- a/cmulocal/libssl.m4 +++ /dev/null @@ -1,152 +0,0 @@ -dnl libssl.m4--Ssl libraries and includes -dnl Derrick Brashear -dnl from KTH kafs and Arla - -AC_DEFUN([CMU_LIBSSL_INC_WHERE1], [ -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$saved_CPPFLAGS -I$1" -CMU_CHECK_HEADER_NOCACHE(openssl/ssl.h, -ac_cv_found_libssl_inc=yes, -ac_cv_found_libssl_inc=no) -CPPFLAGS=$saved_CPPFLAGS -]) - -AC_DEFUN([CMU_LIBSSL_INC_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for libssl headers in $i) - CMU_LIBSSL_INC_WHERE1($i) - CMU_TEST_INCPATH($i, ssl) - if test "$ac_cv_found_libssl_inc" = "yes"; then - ac_cv_libssl_where_inc=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_LIBSSL_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lssl -lcrypto $LIB_SOCKET" -AC_TRY_LINK(, -[SSL_write();], -[ac_cv_found_ssl_lib=yes], -ac_cv_found_ssl_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_LIBSSL_LIB_WHERE], [ - for i in $1; do - AC_MSG_CHECKING(for libssl libraries in $i) - CMU_LIBSSL_LIB_WHERE1($i) - dnl deal with false positives from implicit link paths - CMU_TEST_LIBPATH($i, ssl) - if test "$ac_cv_found_ssl_lib" = "yes" ; then - ac_cv_libssl_where_lib=$i - AC_MSG_RESULT(found) - break - else - AC_MSG_RESULT(not found) - fi - done -]) - -AC_DEFUN([CMU_LIBSSL], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_REQUIRE([CMU_SOCKETS]) -AC_ARG_WITH(libssl, - [AS_HELP_STRING([--with-libssl=PREFIX], [Compile with Libssl support])], - [if test "X$with_libssl" = "X"; then - with_libssl=yes - fi]) -AC_ARG_WITH(libssl-lib, - [ --with-libssl-lib=dir use libssl libraries in dir], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libssl-lib]) - fi]) -AC_ARG_WITH(libssl-include, - [ --with-libssl-include=dir use libssl headers in dir], - [if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_ERROR([No argument for --with-libssl-include]) - fi]) - - if test "X$with_libssl" != "X"; then - if test "$with_libssl" != "yes" -a "$with_libssl" != no; then - ac_cv_libssl_where_lib=$with_libssl/$CMU_LIB_SUBDIR - ac_cv_libssl_where_inc=$with_libssl/include - fi - fi - - if test "$with_libssl" != "no"; then - if test "X$with_libssl_lib" != "X"; then - ac_cv_libssl_where_lib=$with_libssl_lib - fi - if test "X$ac_cv_libssl_where_lib" = "X"; then - CMU_LIBSSL_LIB_WHERE(/usr/local/$CMU_LIB_SUBDIR/openssl /usr/$CMU_LIB_SUBDIR/openssl /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR) - fi - - if test "X$with_libssl_include" != "X"; then - ac_cv_libssl_where_inc=$with_libssl_include - fi - if test "X$ac_cv_libssl_where_inc" = "X"; then - CMU_LIBSSL_INC_WHERE(/usr/local/include /usr/include) - fi - fi - - AC_MSG_CHECKING(whether to include libssl) - if test "X$ac_cv_libssl_where_lib" = "X" -a "X$ac_cv_libssl_where_inc" = "X"; then - ac_cv_found_libssl=no - AC_MSG_RESULT(no) - else - ac_cv_found_libssl=yes - AC_MSG_RESULT(yes) - LIBSSL_INC_DIR=$ac_cv_libssl_where_inc - LIBSSL_LIB_DIR=$ac_cv_libssl_where_lib - LIBSSL_INC_FLAGS="-I${LIBSSL_INC_DIR}" - LIBSSL_LIB_FLAGS="-L${LIBSSL_LIB_DIR} -lssl -lcrypto" - if test "X$RPATH" = "X"; then - RPATH="" - fi - case "${host}" in - *-*-linux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}" - else - RPATH="${RPATH}:${LIBSSL_LIB_DIR}" - fi - ;; - *-*-hpux*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,+b${LIBSSL_LIB_DIR}" - else - RPATH="${RPATH}:${LIBSSL_LIB_DIR}" - fi - ;; - *-*-irix*) - if test "X$RPATH" = "X"; then - RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}" - else - RPATH="${RPATH}:${LIBSSL_LIB_DIR}" - fi - ;; - *-*-solaris2*) - if test "$ac_cv_prog_gcc" = yes; then - if test "X$RPATH" = "X"; then - RPATH="-Wl,-R${LIBSSL_LIB_DIR}" - else - RPATH="${RPATH}:${LIBSSL_LIB_DIR}" - fi - else - RPATH="${RPATH} -R${LIBSSL_LIB_DIR}" - fi - ;; - esac - AC_SUBST(RPATH) - fi - AC_SUBST(LIBSSL_INC_DIR) - AC_SUBST(LIBSSL_LIB_DIR) - AC_SUBST(LIBSSL_INC_FLAGS) - AC_SUBST(LIBSSL_LIB_FLAGS) - ]) - diff --git a/cmulocal/libtoolhack.m4 b/cmulocal/libtoolhack.m4 deleted file mode 100644 index 2847d3f2cd..0000000000 --- a/cmulocal/libtoolhack.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl libtoolhack.m4--hack to make libtool behave better -dnl Rob Earhart - -dnl Libtool tries to compile an empty file to see whether it can build -dnl shared libraries, and treats *any* warning as a problem. -dnl Solaris's and HP's cc complains about the empty file. So we hack -dnl the CFLAGS to make cc not complain. - -AC_DEFUN([CMU_PROG_LIBTOOL], [ -AC_REQUIRE([AC_PROG_CC]) -if test "$ac_cv_prog_gcc" = no; then - case "$host_os" in - solaris2*) - save_cflags="${CFLAGS}" - CFLAGS="-erroff=E_EMPTY_TRANSLATION_UNIT ${CFLAGS}" - ;; - hpux*) - save_cflags="${CFLAGS}" - CFLAGS="-w" - ;; - esac -fi - -AC_PROG_LIBTOOL - -if test "$ac_cv_prog_gcc" = no; then - case "$host_os" in - solaris2*|hpux*) - CFLAGS="${save_cflags}" - esac -fi -]) diff --git a/cmulocal/mips-abi.m4 b/cmulocal/mips-abi.m4 deleted file mode 100644 index 1d1b9abb5f..0000000000 --- a/cmulocal/mips-abi.m4 +++ /dev/null @@ -1,92 +0,0 @@ -dnl mips-abi.m4--Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext -dnl to some value -dnl Derrick Brashear -dnl from KTH krb (from CMU) - -AC_DEFUN([AC_MIPS_ABI], [ -AC_ARG_WITH(mips_abi, - [AS_HELP_STRING([--with-mips-abi=abi], [ABI to use for IRIX (32, n32, or 64)])]) - -case "$host_os" in -irix*) -with_mips_abi="${with_mips_abi:-yes}" -if test -n "$GCC"; then - -# GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select -# which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs. -# -# Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old -# GCC and revert back to O32. The same goes if O32 is asked for - old -# GCCs doesn't like the -mabi option, and new GCCs can't output O32. -# -# Don't you just love *all* the different SGI ABIs? - -case "${with_mips_abi}" in - 32|o32) abi='-mabi=32'; abilibdirext='' ;; - n32|yes) abi='-mabi=n32'; abilibdirext='32' ;; - 64) abi='-mabi=64'; abilibdirext='64' ;; - no) abi=''; abilibdirext='';; - *) AC_MSG_ERROR("Invalid ABI specified") ;; -esac -if test -n "$abi" ; then -ac_foo=krb_cv_gcc_`echo $abi | tr =- __` -dnl -dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to -dnl AC_MSG_RESULT -dnl -AC_MSG_CHECKING([if $CC supports the $abi option]) -AC_CACHE_VAL($ac_foo, [ -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS $abi" -AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no) -CFLAGS="$save_CFLAGS" -]) -ac_res=`eval echo \\\$$ac_foo` -AC_MSG_RESULT($ac_res) -if test $ac_res = no; then -# Try to figure out why that failed... -case $abi in - -mabi=32) - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -mabi=n32" - AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no) - CLAGS="$save_CFLAGS" - if test $ac_res = yes; then - # New GCC - AC_MSG_ERROR([$CC does not support the $with_mips_abi ABI]) - fi - # Old GCC - abi='' - abilibdirext='' - ;; - -mabi=n32|-mabi=64) - if test $with_mips_abi = yes; then - # Old GCC, default to O32 - abi='' - abilibdirext='' - else - # Some broken GCC - AC_MSG_ERROR([$CC does not support the $with_mips_abi ABI]) - fi - ;; -esac -fi #if test $ac_res = no; then -fi #if test -n "$abi" ; then -else -case "${with_mips_abi}" in - 32|o32) abi='-32'; abilibdirext='' ;; - n32|yes) abi='-n32'; abilibdirext='32' ;; - 64) abi='-64'; abilibdirext='64' ;; - no) abi=''; abilibdirext='';; - *) AC_MSG_ERROR("Invalid ABI specified") ;; -esac -fi #if test -n "$GCC"; then -;; -esac - -dnl And then we munge variables to make things work -CFLAGS="${CFLAGS} $abi" -libdir=`echo $libdir | sed 's,/*$,$abilibdirext,'` -LDFLAGS=`echo $LDFLAGS | sed -e "s,/lib$,/lib$abilibdirext," -e "s,\\\(/lib[^a-zA-Z]\\\),\\\1$abilibdirext,g"` - -]) diff --git a/cmulocal/nana.m4 b/cmulocal/nana.m4 deleted file mode 100644 index ed9055b33c..0000000000 --- a/cmulocal/nana.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl nana.m4--nana macro -dnl Rob Earhart - -AC_DEFUN([CMU_NANA], [ - AC_REQUIRE([AC_PROG_CC]) - AC_ARG_WITH(nana, - [AS_HELP_STRING([--with-nana], [use NANA [yes]])],, - with_nana=yes) - if test "$GCC" != yes; then - with_nana=no - elif test "$with_nana" = yes; then - AC_CHECK_PROGS(NANA, nana, :) - if test "$NANA" = ":"; then - with_nana=no - else - AC_CHECK_HEADER(nana.h, - AC_CHECK_LIB(nana, nana_error,,with_nana=no), - with_nana=no) - fi - else - with_nana=no - fi - AC_MSG_CHECKING([whether to use NANA]) - AC_MSG_RESULT($with_nana) - if test "$with_nana" != yes; then - AC_DEFINE(WITHOUT_NANA) - fi -]) diff --git a/cmulocal/openldap.m4 b/cmulocal/openldap.m4 deleted file mode 100644 index e83333394a..0000000000 --- a/cmulocal/openldap.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl -dnl macros for configure.in to detect openldap -dnl - -dnl -dnl Check for OpenLDAP version compatibility -AC_DEFUN([CMU_OPENLDAP_API], -[AC_CACHE_CHECK([OpenLDAP api], [cmu_cv_openldap_api],[ - AC_EGREP_CPP(__openldap_api,[ -#include - -#ifdef LDAP_API_FEATURE_X_OPENLDAP -char *__openldap_api = LDAP_API_FEATURE_X_OPENLDAP; -#endif -], [cmu_cv_openldap_api=yes], [cmu_cv_openldap_api=no])]) -]) - -dnl -dnl Check for OpenLDAP version compatibility -AC_DEFUN([CMU_OPENLDAP_COMPAT], -[AC_CACHE_CHECK([OpenLDAP version], [cmu_cv_openldap_compat],[ - AC_EGREP_CPP(__openldap_compat,[ -#include - -/* Require 2.1.27+ and 2.2.6+ */ -#if LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 1 && LDAP_VENDOR_VERSION_PATCH > 26 -char *__openldap_compat = "2.1.27 or better okay"; -#elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 2 && LDAP_VENDOR_VERSION_PATCH > 5 -char *__openldap_compat = "2.2.6 or better okay"; -#elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR > 2 -char *__openldap_compat = "2.3 or better okay" -#endif -], [cmu_cv_openldap_compat=yes], [cmu_cv_openldap_compat=no])]) -]) - diff --git a/cmulocal/openssl.m4 b/cmulocal/openssl.m4 deleted file mode 100644 index 89c26924a4..0000000000 --- a/cmulocal/openssl.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl -dnl macros for configure.in to detect openssl -dnl - -AC_DEFUN([CMU_HAVE_OPENSSL], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_ARG_WITH(openssl, - [AS_HELP_STRING([--with-openssl=DIR], [use OpenSSL from DIR])], - with_openssl=$withval, with_openssl="yes") - - save_CPPFLAGS=$CPPFLAGS - save_LDFLAGS=$LDFLAGS - - if test -d $with_openssl; then - CPPFLAGS="${CPPFLAGS} -I${with_openssl}/include" - CMU_ADD_LIBPATH(${with_openssl}/$CMU_LIB_SUBDIR) - fi - -case "$with_openssl" in - no) - with_openssl="no";; - *) - dnl if openssl has been compiled with the rsaref2 libraries, - dnl we need to include the rsaref libraries in the crypto check - LIB_RSAREF="" - AC_CHECK_LIB(rsaref, RSAPublicEncrypt, - cmu_have_rsaref=yes; - [AC_CHECK_LIB(RSAglue, RSAPublicEncrypt, - LIB_RSAREF="-lRSAglue -lrsaref", - LIB_RSAREF="-lrsaref")], - cmu_have_rsaref=no) - - AC_CHECK_HEADER(openssl/evp.h, [ - AC_CHECK_LIB(crypto, EVP_DigestInit, - with_openssl="yes", - with_openssl="no", $LIB_RSAREF)], - with_openssl=no) - ;; -esac - - if test "$with_openssl" != "no"; then - AC_DEFINE(HAVE_OPENSSL,[],[Do we have OpenSSL?]) - else - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - fi -]) diff --git a/cmulocal/pthreads.m4 b/cmulocal/pthreads.m4 deleted file mode 100644 index 9c9a9c7b92..0000000000 --- a/cmulocal/pthreads.m4 +++ /dev/null @@ -1,22 +0,0 @@ -dnl pthreads.m4--pthreads setup macro -dnl Rob Earhart - -AC_DEFUN([CMU_PTHREADS], [ - AC_REQUIRE([AC_CANONICAL_HOST]) - cmu_save_LIBS="$LIBS" - AC_CHECK_LIB(pthread, pthread_create,LIB_PTHREAD="-lpthread", - AC_CHECK_LIB(c_r, pthread_create,LIB_PTHREAD="-lc_r", - AC_MSG_ERROR([Can't compile without pthreads]))) - LIBS="$cmu_save_LIBS" - AC_SUBST(LIB_PTHREAD) - AC_DEFINE(_REENTRANT) - case "$host_os" in - solaris2*) - AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) - AC_DEFINE(__EXTENSIONS__) - ;; - irix6*) - AC_DEFINE(_SGI_REENTRANT_FUNCTIONS) - ;; - esac -]) diff --git a/cmulocal/sasl.m4 b/cmulocal/sasl.m4 deleted file mode 100644 index a7252e19fd..0000000000 --- a/cmulocal/sasl.m4 +++ /dev/null @@ -1,93 +0,0 @@ -dnl sasl.m4--sasl libraries and includes -dnl Derrick Brashear -dnl from KTH sasl and Arla - -AC_DEFUN([CMU_SASL_INC_WHERE1], [ -saved_CPPFLAGS=$CPPFLAGS -CPPFLAGS="$saved_CPPFLAGS -I$1" -CMU_CHECK_HEADER_NOCACHE(sasl.h, -ac_cv_found_sasl_inc=yes, -ac_cv_found_sasl_inc=no) -CPPFLAGS=$saved_CPPFLAGS -]) - -AC_DEFUN([CMU_SASL_INC_WHERE], [ - for i in $1; do - CMU_SASL_INC_WHERE1($i) - CMU_TEST_INCPATH($i, sasl) - if test "$ac_cv_found_sasl_inc" = "yes"; then - ac_cv_sasl_where_inc=$i - break - fi - done -]) - -AC_DEFUN([CMU_SASL_LIB_WHERE1], [ -saved_LIBS=$LIBS -LIBS="$saved_LIBS -L$1 -lsasl" -AC_TRY_LINK(, -[sasl_getprop();], -[ac_cv_found_sasl_lib=yes], -ac_cv_found_sasl_lib=no) -LIBS=$saved_LIBS -]) - -AC_DEFUN([CMU_SASL_LIB_WHERE], [ - for i in $1; do - CMU_SASL_LIB_WHERE1($i) - dnl deal with false positives from implicit link paths - CMU_TEST_LIBPATH($i, sasl) - if test "$ac_cv_found_sasl_lib" = "yes" ; then - ac_cv_sasl_where_lib=$i - break - fi - done -]) - -AC_DEFUN([CMU_SASL], [ -AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) -AC_ARG_WITH(sasl, - [AS_HELP_STRING([--with-sasl=DIR], [Compile with libsasl in DIR])], - with_sasl="$withval", - with_sasl="yes") - - SASLFLAGS="" - LIB_SASL="" - - cmu_saved_CPPFLAGS=$CPPFLAGS - cmu_saved_LDFLAGS=$LDFLAGS - cmu_saved_LIBS=$LIBS - if test -d ${with_sasl}; then - ac_cv_sasl_where_lib=${with_sasl}/$CMU_LIB_SUBDIR - ac_cv_sasl_where_inc=${with_sasl}/include - - SASLFLAGS="-I$ac_cv_sasl_where_inc" - LIB_SASL="-L$ac_cv_sasl_where_lib" - CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}" - LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}" - fi - - AC_CHECK_HEADER(sasl.h, - AC_CHECK_LIB(sasl, sasl_getprop, - ac_cv_found_sasl=yes, - ac_cv_found_sasl=no), ac_cv_found_sasl=no) - - LIBS="$cmu_saved_LIBS" - LDFLAGS="$cmu_saved_LDFLAGS" - CPPFLAGS="$cmu_saved_CPPFLAGS" - if test "$ac_cv_found_sasl" = yes; then - LIB_SASL="$LIB_SASL -lsasl" - else - LIB_SASL="" - SASLFLAGS="" - fi - AC_SUBST(LIB_SASL) - AC_SUBST(SASLFLAGS) - ]) - -AC_DEFUN([CMU_SASL_REQUIRED], -[AC_REQUIRE([CMU_SASL]) -if test "$ac_cv_found_sasl" != "yes"; then - AC_MSG_ERROR([Cannot continue without libsasl. -Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.]) -fi]) diff --git a/cmulocal/tcl.m4 b/cmulocal/tcl.m4 deleted file mode 100644 index 4b30f2193b..0000000000 --- a/cmulocal/tcl.m4 +++ /dev/null @@ -1,160 +0,0 @@ -dnl FIRST PASS AFTER STEALING THIS FROM CYRUS! -dnl USE AT YOUR OWN PERIL! -dnl I MEAN IT! -dnl -dnl tcl.m4: an autoconf Tcl locator -dnl -dnl This is rob's Tcl macro, fixed by tjs. It may need occasional tweaking, -dnl but until the next impediment to compilation, it's fill-in-the-blank, -dnl and it should be able to do reasonable things with user input. -dnl -dnl This will probably just work on Andrew systems, but given the variety -dnl and apparent creativity of people who compile Tcl elsewhere, I don't know -dnl what it will do. I have yet to see an autoconf Tcl test that users were -dnl happy with. -dnl -dnl BUGS -dnl The command-line arguments are overcomplicated. -dnl There are doubtlessly others... - -dnl To use this macro, just do CMU_TCL. It outputs -dnl TCL_LIBS, TCL_CPPFLAGS, and TCL_DEFS and SUBSTs them. -dnl If successful, these have stuff in them. If not, they're empty. -dnl If not successful, with_tcl has the value "no". - -AC_DEFUN([CMU_TCL], [ -# --- BEGIN CMU_TCL --- -dnl To link against Tcl, configure does several things to make my life -dnl "easier". -dnl -dnl * maybe ask the user where they think Tcl lives, and try to find it -dnl * maybe ask the user what "tclsh" is called this week (i.e., "tclsh8.0") -dnl * run tclsh, ask it for a path, then run that path through sed -dnl * sanity check its result (many installs are a little broken) -dnl * try to figure out where Tcl is based on this result -dnl * try to guess where the Tcl include files are -dnl -dnl Notes from previous incarnations: -dnl > XXX MUST CHECK FOR TCL BEFORE KERBEROS V4 XXX -dnl > This is because some genius at MIT named one of the Kerberos v4 -dnl > library functions log(). This of course conflicts with the -dnl > logarithm function in the standard math library, used by Tcl. -dnl -dnl > Checking for Tcl first puts -lm before -lkrb on the library list. -dnl - -dnl Check for some information from the user on what the world looks like -AC_ARG_WITH(tclconfig, - [AS_HELP_STRING([--with-tclconfig=DIR], [use tclConfig.sh from DIR (configure gets Tcl configuration from here)])], - dnl trim tclConfig.sh off the end so we can add it back on later. - TclLibBase=`echo ${withval} | sed s/tclConfig.sh\$//`) -AC_ARG_WITH(tcl, - [AS_HELP_STRING([--with-tcl=DIR], [use Tcl from DIR])], - TclLibBase="${withval}/lib") -AC_ARG_WITH(tclsh, - [AS_HELP_STRING([--with-tclsh=TCLSH], [use TCLSH as the tclsh program (let configure find Tcl using this program)])], - TCLSH="${withval}") - -if test "$TCLSH" = "no" -o "$with_tclconfig" = "no" ; then - AC_MSG_WARN([Tcl disabled because tclsh or tclconfig specified as "no"]) - with_tcl=no -fi - -if test "$with_tcl" != "no"; then - if test \! -z "$with_tclconfig" -a \! -d "$with_tclconfig" ; then - AC_MSG_ERROR([--with-tclconfig requires a directory argument.]) - fi - - if test \! -z "$TCLSH" -a \! -x "$TCLSH" ; then - AC_MSG_ERROR([--with-tclsh must specify an executable file.]) - fi - - if test -z "$TclLibBase"; then # do we already know? - # No? Run tclsh and ask it where it lives. - - # Do we know where a tclsh lives? - if test -z "$TCLSH"; then - # Try and find tclsh. Any tclsh. - # If a new version of tcl comes out and unfortunately adds another - # filename, it should be safe to add it (to the front of the line -- - # somef vendors have older, badly installed tclshs that we want to avoid - # if we can) - AC_PATH_PROGS(TCLSH, [tclsh8.1 tclsh8.0 tclsh], "unknown") - fi - - # Do we know where to get a tclsh? - if test "${TCLSH}" != "unknown"; then - AC_MSG_CHECKING([where Tcl says it lives]) - TclLibBase=`echo puts \\\$tcl_library | ${TCLSH} | sed -e 's,[^/]*$,,'` - AC_MSG_RESULT($TclLibBase) - fi - fi - - if test -z "$TclLibBase" ; then - AC_MSG_RESULT([can't find tclsh]) - AC_MSG_WARN([can't find Tcl installation; use of Tcl disabled.]) - with_tcl=no - else - AC_MSG_CHECKING([for tclConfig.sh]) - # Check a list of places where the tclConfig.sh file might be. - for tcldir in "${TclLibBase}" \ - "${TclLibBase}/.." \ - "${TclLibBase}"`echo ${TCLSH} | sed s/sh//` ; do - if test -f "${tcldir}/tclConfig.sh"; then - TclLibBase="${tcldir}" - break - fi - done - - if test -z "${TclLibBase}" ; then - AC_MSG_RESULT("unknown") - AC_MSG_WARN([can't find Tcl configuration; use of Tcl disabled.]) - with_tcl=no - else - AC_MSG_RESULT(${TclLibBase}/) - fi - - if test "${with_tcl}" != no ; then - AC_MSG_CHECKING([Tcl configuration on what Tcl needs to compile]) - . ${TclLibBase}/tclConfig.sh - AC_MSG_RESULT(ok) - dnl no TK stuff for us. - dnl . ${TclLibBase}/tkConfig.sh - fi - - if test "${with_tcl}" != no ; then - dnl Now, hunt for the Tcl include files, since we don't strictly - dnl know where they are; some folks put them (properly) in the - dnl default include path, or maybe in /usr/local; the *BSD folks - dnl put them in other places. - AC_MSG_CHECKING([where Tcl includes are]) - for tclinclude in "${TCL_PREFIX}/include/tcl${TCL_VERSION}" \ - "${TCL_PREFIX}/include/tcl" \ - "${TCL_PREFIX}/include" ; do - if test -r "${tclinclude}/tcl.h" ; then - TCL_CPPFLAGS="-I${tclinclude}" - break - fi - done - if test -z "${TCL_CPPFLAGS}" ; then - AC_MSG_WARN(can't find Tcl includes; use of Tcl disabled.) - with_tcl=no - fi - AC_MSG_RESULT(${TCL_CPPFLAGS}) - fi - - # Finally, pick up the Tcl configuration if we haven't found an - # excuse not to. - if test "${with_tcl}" != no; then - dnl TCL_LIBS="${TK_LIB_SPEC} ${TK_XLIBSW} ${TCL_LD_SEARCH_FLAGS} ${TCL_LIB_SPEC}" - TCL_LIBS="${TCL_LD_SEARCH_FLAGS} ${TCL_LIB_SPEC} ${TCL_LIBS}" - fi - fi -fi - -AC_SUBST(TCL_DEFS) -AC_SUBST(TCL_LIBS) -AC_SUBST(TCL_CPPFLAGS) - -# --- END CMU_TCL --- -]) dnl CMU_TCL diff --git a/cmulocal/util.m4 b/cmulocal/util.m4 deleted file mode 100644 index af3f8d47cb..0000000000 --- a/cmulocal/util.m4 +++ /dev/null @@ -1,72 +0,0 @@ -dnl util.m4--robutil macro -dnl Rob Earhart - -dnl robutil is a collection of stuff I (Rob Earhart) have found useful -dnl to have around when writing code; it's the stuff I wind up rewriting -dnl every time I start a project. This does the autoconf setup -dnl necessary for it. - -dnl This is a helper macro, here because there're times when I -dnl want to know if a type exists or not, but don't want to define -dnl it to something else (the way AC_CHECK_TYPE does). - -AC_DEFUN([CMU_CHECK_TYPE_EXISTS], [ -changequote(<<, >>) -define(<>, translit(CMU_HAVE_$1, [a-z *], [A-Z_P])) -define(<>, translit(cmu_cv_type_$1, [ *], [_p])) -changequote([, ]) - AC_REQUIRE([AC_HEADER_STDC]) - AC_MSG_CHECKING(for $1) - AC_CACHE_VAL(CMU_CV_NAME, [ - AC_EGREP_CPP([$1[[^a-zA-Z_0-9]]], [ -#include -#if STDC_HEADERS -#include -#include -#endif -], CMU_CV_NAME=yes, CMU_CV_NAME=no)]) - AC_MSG_RESULT($CMU_CV_NAME) - if test $CMU_CV_NAME = yes; then - AC_DEFINE(CMU_TYPE_NAME) - fi -]) - -AC_DEFUN([CMU_UTIL], [ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AM_PROG_CC_STDC]) - AC_REQUIRE([AC_PROG_RANLIB]) - AC_REQUIRE([CMU_NANA]) - AC_REQUIRE([CMU_COMERR]) - AC_REQUIRE([AC_HEADER_STDC]) - AC_REQUIRE([AC_TYPE_MODE_T]) - AC_REQUIRE([AC_C_CONST]) - AC_CHECK_HEADERS(sys/sysmacros.h) - AC_CHECK_HEADER(inttypes.h, AC_DEFINE(HAVE_INTTYPES_H), - CMU_CHECK_TYPE_EXISTS(int8_t) - CMU_CHECK_TYPE_EXISTS(uint8_t) - CMU_CHECK_TYPE_EXISTS(u_int8_t) - CMU_CHECK_TYPE_EXISTS(int16_t) - CMU_CHECK_TYPE_EXISTS(uint16_t) - CMU_CHECK_TYPE_EXISTS(u_int16_t) - CMU_CHECK_TYPE_EXISTS(int32_t) - CMU_CHECK_TYPE_EXISTS(uint32_t) - CMU_CHECK_TYPE_EXISTS(u_int32_t) - ) - dnl I'm not sure why autoconf gets so annoyed when these - dnl are embedded as part of the inttypes check, but, whatever, - dnl this works. - if test "$ac_cv_header_inttypes_h" = no; then - AC_CHECK_SIZEOF(short) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long) - fi - - AC_CHECK_TYPE(ssize_t, signed) - THREADED_UTIL_OBJECTS="" - AC_SUBST(THREADED_UTIL_OBJECTS) -]) - -AC_DEFUN([CMU_THREAD_UTIL], [ - AC_REQUIRE([CMU_UTIL]) - THREADED_UTIL_OBJECTS="refcache.o rselock.o" -])