Changeset 684
- Timestamp:
- 1999-10-15T15:18:00+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/configure.in
r674 r684 1 1 dnl Process this file with autoconf to produce a configure script. 2 2 AC_INIT(lib/text_t.h) 3 AC_CONFIG_HEADER(config.h) 4 AC_ARG_PROGRAM 3 5 4 6 PACKAGE=gsdl … … 21 23 AC_PROG_CC 22 24 AC_PROG_CXX 25 AC_PROG_AWK 26 AC_PROG_YACC 23 27 dnl AC_PROG_INSTALL 24 28 AC_PROG_LN_S 25 29 AC_PROG_MAKE_SET 26 30 AC_PROG_RANLIB 31 32 33 dnl Checks for typedefs, structures, and compiler characteristics. 34 AC_AIX 35 AC_ISC_POSIX 36 AC_MINIX 37 fp_C_PROTOTYPES 38 AC_C_CONST 39 AC_TYPE_OFF_T 40 AC_TYPE_SIZE_T 41 AC_HEADER_TIME 42 AC_STRUCT_TM 43 44 dnl --- This should be in the stdc checking ----------------- 45 if test "$ac_cv_prog_cc_stdc" = '-Xc'; then 46 dnl The Pyramids running SMP_DC.OSx on MIPS r3000 chips with 47 dnl /usr/opt/cc3.11/bin/cc treat -Xc as full ANSI mode - no POSIX or 48 dnl XOPEN extensions (like popen). 49 dnl Unfortunately -D_{XOPEN,POSIX}_SOURCE can't provide all that mg 50 dnl needs. So drop back to -Xa 51 AC_TRY_COMPILE( 52 [#include <stdio.h> 53 ], [ FILE *rubbish = popen("yes", "r"); ],, 54 [CC="`echo $CC | sed 's/-Xc/-Xa/'`" ac_cv_prog_cc_stdc='-Xa']) 55 fi 56 dnl ---------------------- 57 27 58 28 59 dnl Checks for libraries. … … 37 68 38 69 dnl Checks for header files. 70 AC_HEADER_DIRENT 39 71 AC_HEADER_STDC 40 AC_CHECK_HEADERS(fcntl.h) 41 42 dnl Checks for typedefs, structures, and compiler characteristics. 43 AC_C_CONST 44 AC_HEADER_TIME 45 72 AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h string.h memory.h sys/procfs.h) 73 AC_EGREP_HEADER(fread, stdio.h, AC_DEFINE(HAVE_FREAD_DECL)) 74 AC_EGREP_HEADER(fgetc, stdio.h, AC_DEFINE(HAVE_FGETC_DECL)) 75 AC_EGREP_HEADER(pr_brksize, sys/procfs.h, AC_DEFINE(HAVE_PR_BRKSIZE)) 76 77 dnl Checks for library functions. 78 AC_FUNC_ALLOCA 79 AC_PROG_GCC_TRADITIONAL 80 AC_TYPE_SIGNAL 81 AC_FUNC_VPRINTF 82 AC_CHECK_FUNCS(ftime select strftime strtol getrusage times mallinfo setbuffer getpagesize) 83 AC_REPLACE_FUNCS(ftruncate strstr strcasecmp) 84 85 86 # *** Custom checking (based on GNU tar configure.in) *** 87 # --------------------------------------------------------------------------- 88 AC_MSG_CHECKING(for HP-UX needing gmalloc) 89 if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then 90 AC_MSG_RESULT(yes) 91 LIBOBJS="$LIBOBJS gmalloc.o" 92 AC_DEFINE(HAVE_VALLOC) 93 else 94 AC_MSG_RESULT(no) 95 AC_CHECK_FUNCS(valloc) 96 fi 97 98 fp_WITH_DMALLOC 99 fp_WITH_REGEX 100 101 # --------------------------------------------------------------------------- 102 if test "$ac_cv_func_alloca" = 'no'; then 103 dnl support functions for alloca.c 104 LIBOBJS="$LIBOBJS xmalloc.o error.o" 105 fi 106 107 108 # --------------------------------------------------------------------------- 109 110 dnl 111 dnl Switch into C++ 112 dnl 113 AC_LANG_CPLUSPLUS 114 115 dnl 116 dnl Check that the GDBM library is available 117 dnl 118 AC_MSG_CHECKING("that the GDBM library is available") 119 AC_TRY_COMPILE( 120 [#include <gdbm.h> 121 ], 122 [], 123 success=yes, 124 success=no 125 ) 126 AC_MSG_RESULT($success) 127 if test $success = "no"; then 128 AC_MSG_ERROR("GDBM Library not available - cannot install") 129 fi 130 131 dnl 132 dnl Now check that Perl is actually around, and can be found 133 dnl 134 AC_MSG_CHECKING("that Perl 5 is available") 135 success="no" 136 pl_path="$PATH" 137 IFS="${IFS= }"; pl_save_ifs="$IFS"; IFS=":" 138 for pl_dir in $pl_path; do 139 test -z "$pl_dir" && pl_dir=. 140 if test -x $pl_dir/perl; then 141 success="yes" 142 break 143 fi 144 done 145 IFS="$pl_save_ifs" 146 147 dnl 148 dnl Perl actually can be run; now we see if it is version 5 by 149 dnl running a sample script (which returns a "clean" version number 150 dnl and then tests the result using expr. If perl errors in some 151 dnl way (eg. broken Perl executable, missing script), we set a failure 152 dnl value ("0") and then proceed as best we can 153 dnl 154 if test $success = "yes"; then 155 try=`perl configtest.pl` || try="0" 156 try=`expr $try \> 5.000` 157 if test $try = "1"; then 158 AC_MSG_RESULT("yes") 159 else 160 success="no" 161 fi 162 fi 163 164 if test $success = "no"; then 165 AC_MSG_RESULT("no") 166 AC_MSG_ERROR("Perl 5 not available - cannot install") 167 fi 46 168 47 169 dnl … … 53 175 dnl know now, before things really go wrong! 54 176 dnl 55 AC_LANG_CPLUSPLUS56 177 success=no 57 178 AC_MSG_CHECKING("whether STL library has known faults") … … 89 210 else 90 211 AC_MSG_RESULT("yes") 91 AC_MSG_ERROR("STL Broken - new not found in vector header file")212 AC_MSG_ERROR("STL Broken - Obtain newer version of GNU C Compiler") 92 213 fi 93 214 … … 95 216 AC_SUBST(gsdlos) 96 217 97 dnl Checks for library functions. 98 AC_FUNC_VPRINTF 99 100 AC_OUTPUT(src/hashfile/Makefile src/colservr/Makefile src/recpt/Makefile src/txt2db/Makefile src/db2txt/Makefile lib/Makefile collect/cstr/src/recpt/Makefile collect/niupepa/src/recpt/Makefile Makefile) 101 102 103 104 218 AC_MSG_CHECKING(for HP-UX needing gmalloc) 219 if test "`(uname -s) 2> /dev/null`" = 'HP-UX'; then 220 AC_MSG_RESULT(yes) 221 LIBOBJS="$LIBOBJS gmalloc.o" 222 AC_DEFINE(HAVE_VALLOC) 223 else 224 AC_MSG_RESULT(no) 225 AC_CHECK_FUNCS(valloc) 226 fi 227 228 fp_WITH_DMALLOC 229 fp_WITH_REGEX 230 231 # --------------------------------------------------------------------------- 232 if test "$ac_cv_func_alloca" = 'no'; then 233 dnl support functions for alloca.c 234 LIBOBJS="$LIBOBJS xmalloc.o error.o" 235 fi 236 237 238 # --------------------------------------------------------------------------- 239 240 AC_OUTPUT(packages/mg/Makefile packages/mg/src/text/Makefile packages/mg/src/images/Makefile 241 packages/mg/src/scripts/Makefile packages/mg/lib/Makefile 242 src/hashfile/Makefile src/colservr/Makefile src/recpt/Makefile src/txt2db/Makefile 243 src/db2txt/Makefile lib/Makefile collect/cstr/src/recpt/Makefile 244 collect/niupepa/src/recpt/Makefile Makefile) 245 246 247 248
Note:
See TracChangeset
for help on using the changeset viewer.