public
Description: A simple program to help you react more quickly to servers and services coming back online.
Homepage:
Clone URL: git://github.com/dustin/waitforsocket.git
waitforsocket / configure.in
100644 71 lines (64 sloc) 1.632 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
dnl $Id: configure.in,v 1.2 2003/06/12 18:54:45 dustin Exp $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h)
 
AC_PROG_CC()
dnl Checks for programs.
AC_PROGRAM_CHECK(UNAMEPROG, uname, uname, )
AC_PROGRAM_CHECK(TRPROG, tr, tr, )
AC_PROGRAM_CHECK(SEDPROG, sed, sed, )
AC_PROGRAM_CHECK(CUTPROG, cut, cut, )
 
dnl What we on, boys?
echo "Checking out your OS..."
OS=`$UNAMEPROG|$TRPROG '[[A-Z]]' '[[a-z]]'`
VER=`$UNAMEPROG -r`
if test "$OS" = "sunos" && test "$VER" -ge 5
then
    OS="solaris"
fi
case "$OS" in
    'sunos')
        echo "Woohoo! SunOS 4.x, one of my favs"
;;
    'netbsd')
echo "NetBSD! One of my favs, setting -Wall"
CFLAGS="$CFLAGS -Wall"
;;
    'solaris')
echo "Solaris?!? Oh, alright..."
;;
    'hp-ux')
        echo "HP-UX, this should be fun..."
        if test GCC != "yes"
        then
            echo "Setting ANSI flags"
            CFLAGS="$CFLAGS -Ae"
        fi
        BSDLIKE=0
        ;;
    'irix')
echo "Looks like IRIX it's going to be..."
if test GCC = "yes"
then
echo "That's odd, we're using gcc... OK."
echo "If you have the IDO, please set the environ CC to cc"
echo "to use the native compiler."
else
echo "Using the native IDO, let's set some CFLAGS"
CFLAGS="$CFLAGS -fullwarn"
fi
;;
esac
 
dnl Do libraries
if test "$OS" != "irix"
then
    AC_CHECK_LIB(nsl, main)
    AC_CHECK_LIB(socket, main)
fi
 
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h sys/select.h)
 
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(select socket herror)
 
AC_OUTPUT(Makefile)