1# Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc. 2# Process this file with autoconf to produce a configure script. 3 4AC_INIT(src/main.c) 5AC_CONFIG_HEADER(config.h:configh.in) 6AC_ARG_PROGRAM 7 8PACKAGE=xtr1.50e 9VERSION=0.2 10AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") 11AC_DEFINE_UNQUOTED(VERSION, "$VERSION") 12AC_SUBST(PACKAGE) 13AC_SUBST(VERSION) 14 15AC_PROG_GCC_TRADITIONAL 16AC_PROG_INSTALL 17AC_PROG_MAKE_SET 18AC_PROG_RANLIB 19AC_PROG_LN_S 20 21AC_AIX 22AC_ISC_POSIX 23AC_MINIX 24fp_C_PROTOTYPES 25AC_C_CONST 26 27ud_WITH_REGEX 28 29dnl Check X680x0 30case "$KSH_VERSION" in 31*X6*) 32 x=.x 33 CFLAGS="$CFLAGS -cc1-stack=262144" 34 CPPFLAGS="$CPPFLAGS -cpp-stack=262144" 35 LIBOBJS="$LIBOBJS options.o" 36 AC_CHECK_LIB(hmem, hmemset) 37 ;; 38*) 39 LIBS="-lm $LIBS" 40 x= 41 ;; 42esac 43AC_SUBST(x)dnl 44 45dnl Checks for libraries. 46AC_CHECK_LIB(bsd, select) 47 48dnl Checks for header files. 49AC_HEADER_STDC 50AC_HEADER_TIME 51AC_CHECK_HEADERS(fcntl.h limits.h string.h sys/select.h sys/time.h termio.h \ 52termios.h unistd.h) 53 54dnl Checks for typedefs, structures, and compiler characteristics. 55AC_C_CONST 56AC_TYPE_OFF_T 57AC_TYPE_PID_T 58AC_TYPE_SIZE_T 59AC_STRUCT_TM 60 61dnl Checks for library functions. 62AC_FUNC_ALLOCA 63AC_FUNC_MEMCMP 64AC_FUNC_STRFTIME 65AC_FUNC_VPRINTF 66AC_TYPE_SIGNAL 67AC_CHECK_TYPE(ushort, unsigned short) 68AC_CHECK_TYPE(ulong, unsigned long) 69AC_CHECK_FUNCS(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS)) 70AC_CHECK_FUNCS(dup2 flushall isascii memcmp memcpy memset memmove mktime \ 71putenv select strcspn strspn strstr strtod strtol strtoul strupr) 72for ac_func in memset memmove mktime putenv strcspn strspn strstr strtod \ 73strtol strtoul strupr strftime vfprintf 74do 75 eval "test \"`echo '$ac_cv_func_'$ac_func`\" = no" && LIBOBJS="$LIBOBJS ${ac_func}.o" 76done 77AC_CHECK_FUNCS(stricmp strcmpi strcasecmp) 78test $ac_cv_func_stricmp = no \ 79 -a $ac_cv_func_strcmpi = no \ 80 -a $ac_cv_func_strcasecmp = no && LIBOBJS="$LIBOBJS stricmp.o" 81AC_CHECK_FUNCS(strnicmp strncasecmp) 82test $ac_cv_func_strnicmp = no \ 83 -a $ac_cv_func_strncasecmp = no && LIBOBJS="$LIBOBJS strnicmp.o" 84 85AC_MSG_CHECKING([for fdopen declaration in stdio.h]) 86AC_TRY_COMPILE([#include <stdio.h>], 87[FILE *fp = fdopen(1, "w");], 88[AC_MSG_RESULT(yes) 89AC_DEFINE(FDOPEN_DECLARED)], 90AC_MSG_RESULT(no)) 91 92AC_MSG_CHECKING([for random functions]) 93AC_TRY_LINK(, [initstate(); setstate(); random(); srandom();], 94[AC_MSG_RESULT(yes) 95AC_DEFINE(HAVE_RANDOM_FUNCS)], 96[AC_MSG_RESULT(no) 97LIBOBJS="$LIBOBJS random.o"]) 98 99AC_OUTPUT(Makefile lib/Makefile src/Makefile doc/Makefile sample/Makefile man/Makefile, 100[ test -z "$CONFIG_HEADERS" || echo > stamp-h ])dnl 101