Skip to content
Snippets Groups Projects
configure 412 KiB
Newer Older
  • Learn to ignore specific revisions
  • #include <stdio.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
    struct buf { int x; };
    FILE * (*rcsopen) (struct buf *, struct stat *, int);
    static char *e (p, i)
         char **p;
         int i;
    {
      return p[i];
    }
    static char *f (char * (*g) (char **, int), char **p, ...)
    {
      char *s;
      va_list v;
      va_start (v,p);
      s = g (p, va_arg (v,int));
      va_end (v);
      return s;
    }
    int test (int i, double x);
    struct s1 {int (*f) (int a);};
    struct s2 {int (*f) (double a);};
    int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
    int argc;
    char **argv;
    
    int main() {
    
    return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      rm -rf conftest*
      am_cv_prog_cc_stdc="$ac_arg"; break
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
    fi
    rm -f conftest*
    done
    CC="$ac_save_CC"
    
    fi
    
    if test -z "$am_cv_prog_cc_stdc"; then
      echo "$ac_t""none needed" 1>&6
    else
      echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
    fi
    case "x$am_cv_prog_cc_stdc" in
      x|xno) ;;
      *) CC="$CC $am_cv_prog_cc_stdc" ;;
    esac
    
    if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
    
    	{ echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    # test for make depend flag
    OL_MKDEP=
    OL_MKDEP_FLAGS=
    if test -z "${MKDEP}"; then
    	OL_MKDEP="${CC-cc}"
    	if test -z "${MKDEP_FLAGS}"; then
    		echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
    
    echo "configure:4070: checking for ${OL_MKDEP} depend flag" >&5
    
    if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      
    			ol_cv_mkdep=no
    			for flag in "-M" "-xM"; do
    				cat > conftest.c <<EOF
    
    				if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:4080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    					| egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
    				then
    
    					if test ! -f conftest."${ac_object}" ; then
    						ol_cv_mkdep=$flag
    						OL_MKDEP_FLAGS="$flag"
    						break
    					fi
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    				fi
    			done
    			rm -f conftest*
    		
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    echo "$ac_t""$ol_cv_mkdep" 1>&6
    	else
    		cc_cv_mkdep=yes
    		OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
    	fi
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    	cc_cv_mkdep=yes
    	OL_MKDEP="${MKDEP}"
    	OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if test "${ol_cv_mkdep}" = no ; then
    	# this will soon become an error
    	echo "configure: warning: do not know how to generate dependencies" 1>&2
    fi
    
    echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
    
    echo "configure:4113: checking for afopen in -ls" >&5
    
    ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
    if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    LIBS="-ls  $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char afopen();
    
    int main() {
    afopen()
    ; return 0; }
    EOF
    
    if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
      
    	AUTH_LIBS=-ls
    	cat >> confdefs.h <<\EOF
    #define HAVE_AIX_SECURITY 1
    EOF
    
    
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    
    
    for ac_func in getaddrinfo 
    do
    echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
    echo "configure:4163: checking for $ac_func" >&5
    if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    #line 4168 "configure"
    #include "confdefs.h"
    /* System header to define __stub macros and hopefully few prototypes,
        which can conflict with char $ac_func(); below.  */
    #include <assert.h>
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char $ac_func();
    char (*f)();
    
    int main() {
    
    /* The GNU C library defines this for functions which it implements
        to always fail with ENOSYS.  Some functions are actually named
        something starting with __ and the normal name is an alias.  */
    #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
    choke me
    #else
    f = $ac_func;
    #endif
    
    ; return 0; }
    EOF
    if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
      rm -rf conftest*
      eval "ac_cv_func_$ac_func=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_func_$ac_func=no"
    fi
    rm -f conftest*
    fi
    
    if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_func 1
    EOF
     
    else
      echo "$ac_t""no" 1>&6
    fi
    done
    
    
    if test $ac_cv_func_getaddrinfo = no ; then
    	if test $ol_enable_ipv6 = yes ; then
    		{ echo "configure: error: IPv6 support requires getaddrinfo()" 1>&2; exit 1; }
    	fi
    	ol_enable_ipv6=no
    fi
    
    if test $ol_enable_unix != no ; then
    	for ac_hdr in sys/un.h 
    do
    ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    echo "configure:4229: checking for $ac_hdr" >&5
    if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    #line 4234 "configure"
    #include "confdefs.h"
    #include <$ac_hdr>
    EOF
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    { (eval echo configure:4239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    if test -z "$ac_err"; then
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=yes"
    else
      echo "$ac_err" >&5
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=no"
    fi
    rm -f conftest*
    fi
    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_hdr 1
    EOF
     
    else
      echo "$ac_t""no" 1>&6
    fi
    done
    
    
    	if test $ol_enable_unix = auto ; then
    		ol_enable_unix=$ac_cv_header_sys_un_h
    	elif test $ac_cv_header_sys_un_h = no ; then
    		{ echo "configure: error: UNIX domain support requires sys/un.h" 1>&2; exit 1; }
    	fi
    fi
    
    
    ol_link_modules=no
    if test $ol_enable_modules != no ; then
    	for ac_hdr in ltdl.h
    do
    ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    
    echo "configure:4279: checking for $ac_hdr" >&5
    
    if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <$ac_hdr>
    EOF
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:4289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    
    ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    if test -z "$ac_err"; then
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=yes"
    else
      echo "$ac_err" >&5
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=no"
    fi
    rm -f conftest*
    fi
    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_hdr 1
    EOF
     
    else
      echo "$ac_t""no" 1>&6
    fi
    done
    
    
    	if test $ac_cv_header_ltdl_h = no ; then
    		{ echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
    	fi
    
    	echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
    
    echo "configure:4321: checking for lt_dlinit in -lltdl" >&5
    
    ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
    if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    LIBS="-lltdl  $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char lt_dlinit();
    
    int main() {
    lt_dlinit()
    ; return 0; }
    EOF
    
    if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
    
      
    	    MODULES_LIBS=-lltdl
    	    cat >> confdefs.h <<\EOF
    #define HAVE_LIBLTDL 1
    
    	if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
    		{ echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
    	fi
    	ol_link_modules=yes
    else
    
    	ol_with_dnssrv_module=static
    
    	ol_with_ldap_module=static
    	ol_with_ldbm_module=static
    	ol_with_passwd_module=static
    	ol_with_perl_module=static
    	ol_with_shell_module=static
    	ol_with_tcl_module=static
    
    # test for EBCDIC
    echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
    
    echo "configure:4384: checking for EBCDIC" >&5
    
    if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    #include "confdefs.h"
    
    
    #if !('M' == 0xd4)
    #include <__ASCII__/generate_error.h>
    
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:4399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    
    ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    if test -z "$ac_err"; then
    
      rm -rf conftest*
    
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    rm -f conftest*
    fi
    
    
    echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
    if test $ol_cv_cpp_ebcdic = yes ; then
    	cat >> confdefs.h <<\EOF
    #define HAVE_EBCDIC 1
    EOF
    
    fi
    
    echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    
    echo "configure:4423: checking for ANSI C header files" >&5
    
    if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    #include "confdefs.h"
    
    #include <stdlib.h>
    #include <stdarg.h>
    #include <string.h>
    #include <float.h>
    
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:4436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    
    ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    if test -z "$ac_err"; then
    
      rm -rf conftest*
    
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    rm -f conftest*
    
    
    if test $ol_cv_header_stdc = yes; then
      # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <string.h>
    
    if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
      egrep "memchr" >/dev/null 2>&1; then
      :
    else
      rm -rf conftest*
      ol_cv_header_stdc=no
    fi
    rm -f conftest*
    
    if test $ol_cv_header_stdc = yes; then
      # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <stdlib.h>
    EOF
    if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
      egrep "free" >/dev/null 2>&1; then
      :
    
    fi
    
    if test $ol_cv_header_stdc = yes; then
      # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
    if test "$cross_compiling" = yes; then
      :
    
    #include "confdefs.h"
    
    #include <ctype.h>
    #ifndef HAVE_EBCDIC
    #	define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
    #	define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
    #else
    #	define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
    		|| ('j' <= (c) && (c) <= 'r') \
    		|| ('s' <= (c) && (c) <= 'z'))
    #	define TOUPPER(c)	(ISLOWER(c) ? ((c) | 0x40) : (c))
    #endif
    #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
    int main () { int i; for (i = 0; i < 256; i++)
    if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
    exit (0); }
    
    if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
    
      rm -fr conftest*
      ol_cv_header_stdc=no
    fi
    rm -fr conftest*
    
    fi
    
    echo "$ac_t""$ol_cv_header_stdc" 1>&6
    if test $ol_cv_header_stdc = yes; then
      cat >> confdefs.h <<\EOF
    #define STDC_HEADERS 1
    
    
    if test $ol_cv_header_stdc != yes; then
    	echo "configure: warning: could not locate Standard C compliant headers" 1>&2
    
    ac_header_dirent=no
    for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
    do
    ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
    
    echo "configure:4544: checking for $ac_hdr that defines DIR" >&5
    
    if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
    
    #include <sys/types.h>
    #include <$ac_hdr>
    
    if { (eval echo configure:4557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      eval "ac_cv_header_dirent_$ac_safe=yes"
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
      eval "ac_cv_header_dirent_$ac_safe=no"
    
    if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
    
      echo "$ac_t""yes" 1>&6
    
        ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    
      cat >> confdefs.h <<EOF
    
    else
      echo "$ac_t""no" 1>&6
    fi
    
    done
    # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
    if test $ac_header_dirent = dirent.h; then
    echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
    
    echo "configure:4582: checking for opendir in -ldir" >&5
    
    ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
    if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char opendir();
    
    
    int main() {
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
    
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    else
    echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
    
    echo "configure:4623: checking for opendir in -lx" >&5
    
    ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
    if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char opendir();
    
    
    int main() {
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
    
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    fi
    
    echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
    
    echo "configure:4665: checking for sys/wait.h that is POSIX.1 compatible" >&5
    
    if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    #include "confdefs.h"
    
    #include <sys/types.h>
    #include <sys/wait.h>
    #ifndef WEXITSTATUS
    #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
    #endif
    #ifndef WIFEXITED
    #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
    #endif
    
    int main() {
    
    int s;
    wait (&s);
    s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
      rm -rf conftest*
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    rm -f conftest*
    fi
    
    
    echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
    if test $ac_cv_header_sys_wait_h = yes; then
      cat >> confdefs.h <<\EOF
    #define HAVE_SYS_WAIT_H 1
    EOF
    
    echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
    
    echo "configure:4707: checking POSIX termios" >&5
    
    if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
    
    #include "confdefs.h"
    
    #include <sys/types.h>
    #include <unistd.h>
    #include <termios.h>
    
    int main() {
    
    /* SunOS 4.0.3 has termios.h but not the library calls.  */
       tcgetattr(0, 0);
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    fi
    rm -f conftest*
    
     echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
    
    echo "configure:4738: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
    
    if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
    
      gwinsz_in_termios_h=no
      if test $am_cv_sys_posix_termios = yes; then
        cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <sys/types.h>
    #     include <termios.h>
    #     ifdef TIOCGWINSZ
            yes
    #     endif
        
    EOF
    if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
      egrep "yes" >/dev/null 2>&1; then
      rm -rf conftest*
      gwinsz_in_termios_h=yes
    
    rm -f conftest*
    
      fi
    
      if test $gwinsz_in_termios_h = no; then
        cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <sys/types.h>
    #     include <sys/ioctl.h>
    #     ifdef TIOCGWINSZ
            yes
    #     endif
        
    
    if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
      egrep "yes" >/dev/null 2>&1; then
      rm -rf conftest*
      am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
    fi
    rm -f conftest*
    
      fi
      
    fi
    
    echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
      if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
        cat >> confdefs.h <<\EOF
    #define GWINSZ_IN_SYS_IOCTL 1
    EOF
    
      fi
    
    if test $am_cv_sys_posix_termios = yes ; then
    	cat >> confdefs.h <<\EOF
    #define HAVE_POSIX_TERMIOS 1
    EOF
    
    fi
    
    for ac_hdr in \
    	arpa/inet.h		\
    	arpa/nameser.h	\
    	assert.h		\
    
    	libutil.h		\
    	limits.h		\
    	locale.h		\
    	netinet/tcp.h	\
    	malloc.h		\
    	memory.h		\
    	psap.h			\
    	pwd.h			\
    
    	resolv.h		\
    	sgtty.h			\
    	shadow.h		\
    	stddef.h		\
    	string.h		\
    	strings.h		\
    	sysexits.h		\
    	sys/file.h		\
    	sys/filio.h		\
    	sys/errno.h		\
    	sys/ioctl.h		\
    	sys/param.h		\
    	sys/resource.h	\
    	sys/select.h	\
    	sys/socket.h	\
    	sys/syslog.h	\
    	sys/time.h		\
    	sys/types.h		\
    	syslog.h		\
    	termios.h		\
    	unistd.h		\
    
    do
    ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    
    echo "configure:4850: checking for $ac_hdr" >&5
    
    if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <$ac_hdr>
    EOF
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:4860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    
    ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    if test -z "$ac_err"; then
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=yes"
    else
      echo "$ac_err" >&5
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=no"
    fi
    rm -f conftest*
    fi
    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_hdr 1
    EOF
     
    else
      echo "$ac_t""no" 1>&6
    fi
    done
    
    
    
    echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
    
    echo "configure:4890: checking for sigset in -lV3" >&5
    
    ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
    if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      ac_save_LIBS="$LIBS"
    LIBS="-lV3  $LIBS"
    cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char sigset();
    
    int main() {
    sigset()
    ; return 0; }
    EOF
    
    if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=yes"
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_lib_$ac_lib_var=no"
    fi
    rm -f conftest*
    LIBS="$ac_save_LIBS"
    
    fi
    if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
        -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_lib 1
    EOF
    
      LIBS="-lV3 $LIBS"
    
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    
    if test $ac_cv_header_winsock_h = yes; then
    	echo $ac_n "checking for winsock""... $ac_c" 1>&6
    
    echo "configure:4939: checking for winsock" >&5
    
    if eval "test \"\${ol_cv_winsock+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    #include <winsock.h>
    int main() {
    
    
    			socket(0,0,0);
    			select(0,NULL,NULL,NULL,NULL);
    			closesocket(0);
    			gethostname(NULL,0);
        	
    
    if { (eval echo configure:4956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
    
    rm -f conftest*]
    fi
    
    echo "$ac_t""$ol_cv_winsock" 1>&6
    
    	if test $ol_cv_winsock = yes ; then
    		cat >> confdefs.h <<\EOF
    #define HAVE_WINSOCK 1
    EOF
    
    		ac_cv_func_socket=yes
    		ac_cv_func_select=yes
    		ac_cv_func_closesocket=yes
    		ac_cv_func_gethostname=yes
    	fi
    
    echo $ac_n "checking for socket""... $ac_c" 1>&6
    
    echo "configure:4984: checking for socket" >&5
    
    if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
    
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #include "confdefs.h"
    /* System header to define __stub macros and hopefully few prototypes,
    
        which can conflict with char socket(); below.  */
    
    #include <assert.h>
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    
    char (*f)();