1dnl Process this file with autoconf to produce a configure script. 2dnl 3AC_INIT(SWrite.c) 4 5AC_CONFIG_HEADER(config.h) 6 7no_signals=yes 8AC_ARG_ENABLE(signals,[ --enable-signals allow use of signal handling],[no_signals=no]) 9 10wi_OS_VAR 11 12SFLAG='-s' 13 14case "$OS" in 15 macosx*) 16 SFLAG='-Wl,-x' 17 ;; 18esac 19 20AC_PROG_CC 21wi_CFLAGS 22AC_PROG_RANLIB 23 24dnl Needed to build the samples. 25wi_NET_LIBS 26 27AC_SUBST(CC) 28AC_SUBST(CFLAGS) 29AC_SUBST(CPPFLAGS) 30AC_SUBST(LDFLAGS) 31AC_SUBST(LIBS) 32AC_SUBST(DEFS) 33AC_SUBST(SFLAG) 34 35AC_C_CONST 36 37AC_HEADER_STDC 38AC_CHECK_HEADERS(unistd.h sys/un.h) 39wi_HEADER_SYS_SELECT_H 40AC_FUNC_SELECT_ARGTYPES 41wi_STRUCT_CMSGHDR 42wi_MSGHDR_CONTROL 43wi_MSGHDR_ACCRIGHTS 44wi_SOCKADDR_UN_SUN_LEN 45AC_TYPE_SIZE_T 46 47 48AC_CHECK_FUNCS(sigaction) 49wi_FUNC_SIGSETJMP 50 51changequote(<<, >>)dnl 52 53if test "$no_signals" = no ; then 54 dv1='# if 0' 55 dv2='#if 0' 56else 57 dv1='# if 1' 58 dv2='#if 1' 59fi 60 61if sed "s!^.*/. %config1!${dv1} /* %config1!;s!^.*/. %config2!${dv2} /* %config2!" sio.h > temp.h ; then 62 mv temp.h sio.h 63 chmod a+r sio.h 64fi 65 66if sed "s!^.*/. %config1!${dv1} /* %config1!;s!^.*/. %config2!${dv2} /* %config2!" usio.h > temp.h ; then 67 mv temp.h usio.h 68 chmod a+r usio.h 69fi 70 71patterns1="" 72if [ "$SYS" = solaris ] ; then 73 patterns1='s!/. %configure%.*!#define SAccept SAcceptS!' 74 patterns2='s!/. %configure%.*!#define UAccept UAcceptS!' 75fi 76 77if [ "$patterns1" != "" ] ; then 78 sed "$patterns1" < sio.h > tmpfile 79 if [ $? -eq 0 ] ; then 80 mv tmpfile sio.h 81 chmod 644 sio.h 82 else 83 /bin/rm tmpfile 84 fi 85fi 86 87if [ "$patterns2" != "" ] ; then 88 sed "$patterns2" < usio.h > tmpfile 89 if [ $? -eq 0 ] ; then 90 mv tmpfile usio.h 91 chmod 644 usio.h 92 else 93 /bin/rm tmpfile 94 fi 95fi 96 97changequote([, ])dnl 98 99LIBS=`echo "$LIBS" | sed 's/^ *//;s/ *$//;s/ */ /g'` 100LDFLAGS=`echo "$LDFLAGS" | sed 's/^ *//;s/ *$//;s/ */ /g'` 101CPPFLAGS=`echo "$CPPFLAGS" | sed 's/^ *//;s/ *$//;s/ */ /g'` 102CFLAGS=`echo "$CFLAGS" | sed 's/^ *//;s/ *$//;s/ */ /g'` 103DEFS=`echo "$DEFS" | sed 's/^ *//;s/ *$//;s/ */ /g'` 104 105AC_OUTPUT([Makefile ucase_c/Makefile ucase_s/Makefile time_c/Makefile time_s/Makefile srltest/Makefile sendmessage/Makefile]) 106