From e917fc5c474e11e47b656295d73514ca9ec45626 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sun, 16 May 2010 22:48:52 +0100 Subject: [PATCH] Autoconf : Kill dead code Remove unused autoconf macros - they're not being called, and so have bitrotted, and are just cluttering up the tree. Change-Id: Ib2d1fc5121b6845cf0b500e5aef8ca822be58ad3 Reviewed-on: http://gerrit.openafs.org/1971 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- src/cf/aix-cc.m4 | 44 --------------------- src/cf/fdsetsize.m4 | 106 --------------------------------------------------- src/cf/solaris-cc.m4 | 38 ------------------ 3 files changed, 188 deletions(-) delete mode 100644 src/cf/aix-cc.m4 delete mode 100644 src/cf/fdsetsize.m4 delete mode 100644 src/cf/solaris-cc.m4 diff --git a/src/cf/aix-cc.m4 b/src/cf/aix-cc.m4 deleted file mode 100644 index 6b1a5b0..0000000 --- a/src/cf/aix-cc.m4 +++ /dev/null @@ -1,44 +0,0 @@ -dnl -dnl $Id$ -dnl - -dnl We do not quite know how the version number of the xlc -dnl corresponds to the value of __IBMCC__ but 440 (decimal) -dnl seems to be the first compiler that works for us. -dnl -dnl Guess: -dnl -dnl lslpp says __IBMCC__ -dnl -dnl vac.C 4.4.0.0 440 -dnl vac.C 5.0.2.1 502 -dnl - -AC_DEFUN([AC_AIX_CC_GOOD], [ -AIXCC="$CC" -save_CC="$CC" -if test "$CC" ; then - AC_CHECK_PROGS(AIXCC, "$CC" xlc /usr/vac/bin/xlc gcc) -else - AC_CHECK_PROGS(AIXCC, xlc /usr/vac/bin/xlc gcc) -fi -CC="$AIXCC" -AC_MSG_CHECKING(whether CC is a good enough Aix cc) -AC_CACHE_VAL(ac_cv_aix_cc_good, -[ -XLCVERSION=440 -AC_TRY_RUN( -[ -int main(void) { return __IBMC__ < $XLCVERSION;} -], -ac_cv_aix_cc_good=yes, -ac_cv_aix_cc_good=no, -ac_cv_aix_cc_good=no) -AC_MSG_RESULT($ac_cv_aix_cc_good)]) -if test "$ac_cv_aix_cc_good" = "yes"; then - AC_CHECK_PROGS(CC, "$AIXCC") -else - CC="$save_CC" -fi -]) - diff --git a/src/cf/fdsetsize.m4 b/src/cf/fdsetsize.m4 deleted file mode 100644 index 65a65ec..0000000 --- a/src/cf/fdsetsize.m4 +++ /dev/null @@ -1,106 +0,0 @@ -AC_DEFUN([FD_SET_OBEYS_FD_SETSIZE], [ -AC_MSG_CHECKING(for default FD_SETSIZE) -AC_CACHE_VAL(ac_cv_default_fdsetsize, -[ -AC_TRY_RUN( -changequote(<<, >>)dnl -<< -#include -#include -#include -#ifdef HAVE_SYS_SELECT_H -#include -#endif -int main(int argc, char *argv[]) -{ - FILE *fp; - int ac_cv_default_fdsetsize; -#if defined(FD_SETSIZE) - ac_cv_default_fdsetsize = FD_SETSIZE; -#else - ac_cv_default_fdsetsize = (sizeof(fd_set)*8); -#endif - if ((fp = fopen("conftestval", "w")) == NULL) - exit(1); - fprintf(fp, "%d\n", ac_cv_default_fdsetsize); - fclose(fp); - exit(0); -} ->> -changequote([, ])dnl -, -ac_cv_default_fdsetsize=`cat conftestval`, -ac_cv_default_fdsetsize=-1, -ac_cv_default_fdsetsize=1024 -) -AC_MSG_RESULT([$ac_cv_default_fdsetsize]) -]) - -AC_MSG_CHECKING(for default fd_set size) -AC_CACHE_VAL(ac_cv_default_fd_set_size, -[ -AC_TRY_RUN( -changequote(<<, >>)dnl -<< -#include -#include -#include -#ifdef HAVE_SYS_SELECT_H -#include -#endif -int main(int argc, char *argv[]) -{ - FILE *fp; - int ac_cv_default_fd_set_size; - ac_cv_default_fd_set_size = (sizeof(fd_set)); - - if ((fp = fopen("conftestval", "w")) == NULL) - exit(1); - fprintf(fp, "%d\n", ac_cv_default_fd_set_size); - fclose(fp); - exit(0); -} ->> -changequote([, ])dnl -, -ac_cv_default_fd_set_size=`cat conftestval`, -ac_cv_default_fd_set_size=-1, -ac_cv_default_fd_set_size=128 -) -AC_MSG_RESULT([$ac_cv_default_fd_set_size]) -]) - -AC_MSG_CHECKING(for sizeof fd_set obeying FD_SETSIZE) -AC_CACHE_VAL(ac_cv_fd_set_size_obeys, -[ -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS -DORIG_FD_SETSIZE=$ac_cv_default_fdsetsize -DORIG_fd_set_size=$ac_cv_default_fd_set_size" -AC_TRY_RUN([ -#include -#include -#include -#if (ORIG_FD_SETSIZE < 2048) -#define FD_SETSIZE 2048 -#define __FD_SETSIZE 2048 -#else -#define FD_SETSIZE 1024 -#define __FD_SETSIZE 1024 -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -int main() { - if ((ORIG_fd_set_size < 0) || (ORIG_FD_SETSIZE < 0)) - exit(1); - exit((sizeof(fd_set) == ORIG_fd_set_size) ? 1 : 0); -} -], -ac_cv_fd_set_size_obeys=yes, -ac_cv_fd_set_size_obeys=no, -ac_cv_fd_set_size_obeys=yes) -CPPFLAGS=$save_CPPFLAGS -AC_MSG_RESULT([$ac_cv_fd_set_size_obeys]) -]) - -]) - diff --git a/src/cf/solaris-cc.m4 b/src/cf/solaris-cc.m4 deleted file mode 100644 index d9e379a..0000000 --- a/src/cf/solaris-cc.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl -dnl $Id$ -dnl - -dnl -dnl The Solaris compiler defines __SUNPRO_C as a hex number -dnl whose digits correspond to the digits in the compiler -dnl version. Thus compiler version 4.2.0 is 0x420. -dnl - -AC_DEFUN([AC_SOLARIS_CC_GOOD], [ -SOLARISCC="$CC" -save_CC="$CC" -if test "$CC" ; then - AC_CHECK_PROGS(SOLARISCC, "$CC" cc /opt/SUNWspro/bin/cc gcc) -else - AC_CHECK_PROGS(SOLARISCC, cc /opt/SUNWspro/bin/cc gcc) -fi -CC="$SOLARISCC" -AC_MSG_CHECKING(whether CC is a good enough Solaris cc) -AC_CACHE_VAL(ac_cv_solaris_cc_good, -[ -SUNPROVERSION=0x400 -AC_TRY_RUN( -[ -int main(void) { return __SUNPRO_C < $SUNPROVERSION;} -], -ac_cv_solaris_cc_good=yes, -ac_cv_solaris_cc_good=no, -ac_cv_solaris_cc_good=no) -AC_MSG_RESULT($ac_cv_solaris_cc_good)]) -if test "$ac_cv_solaris_cc_good" = "yes"; then - AC_CHECK_PROGS(CC, "$SOLARISCC") -else - CC="$save_CC" -fi -]) - -- 1.9.4