Added termcap and ncurses detection.

This commit is contained in:
Kurt Zeilenga 1998-09-21 06:09:46 +00:00
parent 088ff28061
commit 3b4931c0be
4 changed files with 280 additions and 97 deletions

View File

@ -9,7 +9,8 @@ PROGRAMS= ud
LDAP_INCDIR= ../../include
LDAP_LIBDIR= ../../libraries
XLIBS = $(LIBTERMCAP)
XDEFS = $(TERMCAP_DEFS)
XLIBS = $(TERMCAP_LIBS)
ud : version.o
$(CC) $(LDFLAGS) -o $@ version.o $(OBJS) $(LIBS)

336
configure vendored
View File

@ -3129,18 +3129,165 @@ fi
fi
# ud needs termcap (should insert check here)
LIBTERMCAP="-ltermcap"
ol_link_termcap=no
TERMCAP_DEFS=
TERMCAP_LIBS=
for ac_hdr in termcap.h ncurses.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3142: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3147 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
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_link_termcap = no ; then
echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
echo "configure:3181: checking for tputs in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3189 "configure"
#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 tputs();
int main() {
tputs()
; return 0; }
EOF
if { (eval echo configure:3200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
have_termcap=yes
else
echo "$ac_t""no" 1>&6
have_termcap=no
fi
if test $have_termcap = yes ; then
ol_link_termcap=yes
TERMCAP_LIBS=-ltermcap
fi
fi
if test $ol_link_termcap = no ; then
echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
echo "configure:3229: checking for initscr in -lncurses" >&5
ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3237 "configure"
#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 initscr();
int main() {
initscr()
; return 0; }
EOF
if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
have_ncurses=yes
else
echo "$ac_t""no" 1>&6
have_ncurses=no
fi
if test $have_ncurses = yes ; then
ol_link_termcap=yes
TERMCAP_LIBS=-lncurses
fi
fi
if test $ol_link_termcap = no ; then
TERMCAP_DEFS="-DNOTERMCAP"
TERMCAP_LIBS=
fi
# FreeBSD (and others) have crypt(3) in -lcrypt
if test $ol_enable_crypt != no ; then
echo $ac_n "checking for crypt""... $ac_c" 1>&6
echo "configure:3139: checking for crypt" >&5
echo "configure:3286: checking for crypt" >&5
if eval "test \"`echo '$''{'ac_cv_func_crypt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3144 "configure"
#line 3291 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char crypt(); below. */
@ -3163,7 +3310,7 @@ crypt();
; return 0; }
EOF
if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_crypt=yes"
else
@ -3182,7 +3329,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
echo "configure:3186: checking for crypt in -lcrypt" >&5
echo "configure:3333: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3190,7 +3337,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3194 "configure"
#line 3341 "configure"
#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
@ -3201,7 +3348,7 @@ int main() {
crypt()
; return 0; }
EOF
if { (eval echo configure:3205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3240,12 +3387,12 @@ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:3244: checking for ANSI C header files" >&5
echo "configure:3391: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3249 "configure"
#line 3396 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -3253,7 +3400,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3270,7 +3417,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3274 "configure"
#line 3421 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -3288,7 +3435,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3292 "configure"
#line 3439 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -3309,7 +3456,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 3313 "configure"
#line 3460 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -3320,7 +3467,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@ -3348,12 +3495,12 @@ 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:3352: checking for $ac_hdr that defines DIR" >&5
echo "configure:3499: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3357 "configure"
#line 3504 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@ -3361,7 +3508,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:3365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@ -3386,7 +3533,7 @@ 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:3390: checking for opendir in -ldir" >&5
echo "configure:3537: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3394,7 +3541,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3398 "configure"
#line 3545 "configure"
#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
@ -3405,7 +3552,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3427,7 +3574,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:3431: checking for opendir in -lx" >&5
echo "configure:3578: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3435,7 +3582,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3439 "configure"
#line 3586 "configure"
#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
@ -3446,7 +3593,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -3469,12 +3616,12 @@ fi
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
echo "configure:3473: checking for sys/wait.h that is POSIX.1 compatible" >&5
echo "configure:3620: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3478 "configure"
#line 3625 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@ -3490,7 +3637,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
if { (eval echo configure:3494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@ -3526,17 +3673,17 @@ for ac_hdr in \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3530: checking for $ac_hdr" >&5
echo "configure:3677: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3535 "configure"
#line 3682 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3564,12 +3711,12 @@ done
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:3568: checking for uid_t in sys/types.h" >&5
echo "configure:3715: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3573 "configure"
#line 3720 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@ -3598,7 +3745,7 @@ EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
echo "configure:3602: checking type of array argument to getgroups" >&5
echo "configure:3749: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3606,7 +3753,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
#line 3610 "configure"
#line 3757 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@ -3631,7 +3778,7 @@ main()
}
EOF
if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
@ -3645,7 +3792,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
#line 3649 "configure"
#line 3796 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@ -3669,12 +3816,12 @@ EOF
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
echo "configure:3673: checking for mode_t" >&5
echo "configure:3820: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3678 "configure"
#line 3825 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3702,12 +3849,12 @@ EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:3706: checking for off_t" >&5
echo "configure:3853: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3711 "configure"
#line 3858 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3735,12 +3882,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:3739: checking for pid_t" >&5
echo "configure:3886: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3744 "configure"
#line 3891 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3768,12 +3915,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:3772: checking return type of signal handlers" >&5
echo "configure:3919: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3777 "configure"
#line 3924 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@ -3790,7 +3937,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:3794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@ -3809,12 +3956,12 @@ EOF
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:3813: checking for size_t" >&5
echo "configure:3960: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3818 "configure"
#line 3965 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3842,12 +3989,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:3846: checking for uid_t in sys/types.h" >&5
echo "configure:3993: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3851 "configure"
#line 3998 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@ -3876,12 +4023,12 @@ EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
echo "configure:3880: checking for st_blksize in struct stat" >&5
echo "configure:4027: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3885 "configure"
#line 4032 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -3889,7 +4036,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
if { (eval echo configure:3893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@ -3910,12 +4057,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:3914: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:4061: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3919 "configure"
#line 4066 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@ -3924,7 +4071,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:3928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@ -3945,12 +4092,12 @@ EOF
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:3949: checking whether struct tm is in sys/time.h or time.h" >&5
echo "configure:4096: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3954 "configure"
#line 4101 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@ -3958,7 +4105,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:3962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@ -3980,12 +4127,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:3984: checking for working const" >&5
echo "configure:4131: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3989 "configure"
#line 4136 "configure"
#include "confdefs.h"
int main() {
@ -4034,7 +4181,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:4038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -4056,7 +4203,7 @@ fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
echo "configure:4060: checking for 8-bit clean memcmp" >&5
echo "configure:4207: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4064,7 +4211,7 @@ else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
#line 4068 "configure"
#line 4215 "configure"
#include "confdefs.h"
main()
@ -4074,7 +4221,7 @@ main()
}
EOF
if { (eval echo configure:4078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
@ -4092,12 +4239,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:4096: checking return type of signal handlers" >&5
echo "configure:4243: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4101 "configure"
#line 4248 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@ -4114,7 +4261,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@ -4133,12 +4280,12 @@ EOF
echo $ac_n "checking for strftime""... $ac_c" 1>&6
echo "configure:4137: checking for strftime" >&5
echo "configure:4284: checking for strftime" >&5
if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4142 "configure"
#line 4289 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strftime(); below. */
@ -4161,7 +4308,7 @@ strftime();
; return 0; }
EOF
if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_strftime=yes"
else
@ -4183,7 +4330,7 @@ else
echo "$ac_t""no" 1>&6
# strftime is in -lintl on SCO UNIX.
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
echo "configure:4187: checking for strftime in -lintl" >&5
echo "configure:4334: checking for strftime in -lintl" >&5
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -4191,7 +4338,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4195 "configure"
#line 4342 "configure"
#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
@ -4202,7 +4349,7 @@ int main() {
strftime()
; return 0; }
EOF
if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -4229,12 +4376,12 @@ fi
fi
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:4233: checking for vprintf" >&5
echo "configure:4380: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4238 "configure"
#line 4385 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@ -4257,7 +4404,7 @@ vprintf();
; return 0; }
EOF
if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@ -4281,12 +4428,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:4285: checking for _doprnt" >&5
echo "configure:4432: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4290 "configure"
#line 4437 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@ -4309,7 +4456,7 @@ _doprnt();
; return 0; }
EOF
if { (eval echo configure:4313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@ -4334,7 +4481,7 @@ fi
fi
echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
echo "configure:4338: checking for wait3 that fills in rusage" >&5
echo "configure:4485: checking for wait3 that fills in rusage" >&5
if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4342,7 +4489,7 @@ else
ac_cv_func_wait3_rusage=no
else
cat > conftest.$ac_ext <<EOF
#line 4346 "configure"
#line 4493 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@ -4373,7 +4520,7 @@ main() {
}
}
EOF
if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_wait3_rusage=yes
else
@ -4414,12 +4561,12 @@ for ac_func in \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4418: checking for $ac_func" >&5
echo "configure:4565: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4423 "configure"
#line 4570 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4442,7 +4589,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -4470,12 +4617,12 @@ done
for ac_func in strdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4474: checking for $ac_func" >&5
echo "configure:4621: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4479 "configure"
#line 4626 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4498,7 +4645,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -4528,13 +4675,13 @@ done
# Check Configuration
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
echo "configure:4532: checking declaration of sys_errlist" >&5
echo "configure:4679: checking declaration of sys_errlist" >&5
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4538 "configure"
#line 4685 "configure"
#include "confdefs.h"
#include <stdio.h>
@ -4544,7 +4691,7 @@ int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:4695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ol_cv_dcl_sys_errlist=yes
else
@ -4565,20 +4712,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then
EOF
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
echo "configure:4569: checking existence of sys_errlist" >&5
echo "configure:4716: checking existence of sys_errlist" >&5
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4575 "configure"
#line 4722 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
char *c = (char *) *sys_errlist
; return 0; }
EOF
if { (eval echo configure:4582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ol_cv_have_sys_errlist=yes
else
@ -4871,7 +5018,8 @@ s%@SET_MAKE@%$SET_MAKE%g
s%@SENDMAIL@%$SENDMAIL%g
s%@EDITOR@%$EDITOR%g
s%@FINGER@%$FINGER%g
s%@LIBTERMCAP@%$LIBTERMCAP%g
s%@TERMCAP_DEFS@%$TERMCAP_DEFS%g
s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
s%@LIBOBJS@%$LIBOBJS%g
s%@BUILD_LDAPD@%$BUILD_LDAPD%g
s%@BUILD_SLAPD@%$BUILD_SLAPD%g

View File

@ -452,8 +452,36 @@ dnl AC_DEFINE(HAVE_TCPD)
fi
# ud needs termcap (should insert check here)
LIBTERMCAP="-ltermcap"
AC_SUBST(LIBTERMCAP)
ol_link_termcap=no
TERMCAP_DEFS=
TERMCAP_LIBS=
AC_CHECK_HEADERS(termcap.h ncurses.h)
if test $ol_link_termcap = no ; then
AC_CHECK_LIB(termcap, tputs, [have_termcap=yes], [have_termcap=no])
if test $have_termcap = yes ; then
ol_link_termcap=yes
TERMCAP_LIBS=-ltermcap
fi
fi
if test $ol_link_termcap = no ; then
AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
if test $have_ncurses = yes ; then
ol_link_termcap=yes
TERMCAP_LIBS=-lncurses
fi
fi
if test $ol_link_termcap = no ; then
TERMCAP_DEFS="-DNOTERMCAP"
TERMCAP_LIBS=
fi
AC_SUBST(TERMCAP_DEFS)
AC_SUBST(TERMCAP_LIBS)
# FreeBSD (and others) have crypt(3) in -lcrypt
if test $ol_enable_crypt != no ; then

View File

@ -145,6 +145,9 @@
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H
/* Define if you have the <ndbm.h> header file. */
#undef HAVE_NDBM_H
@ -181,6 +184,9 @@
/* Define if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
/* Define if you have the <termcap.h> header file. */
#undef HAVE_TERMCAP_H
/* Define if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H