From 9fb0a7cbfc0a725ab31f159d2e23371a4578532d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 11 May 2002 00:25:49 +0000 Subject: Fix to include -Ipopt in getpass test. Jeremy. (This used to be commit 41cec26ee36458c2f6fdf768d25a83031e4d5bbb) --- source3/configure | 97 +++++++++++++++++++++++++++++++++++++++++---- source3/configure.in | 2 +- source3/include/config.h.in | 2 +- 3 files changed, 91 insertions(+), 10 deletions(-) diff --git a/source3/configure b/source3/configure index 0e95fa91d4..72d8524610 100755 --- a/source3/configure +++ b/source3/configure @@ -11032,7 +11032,7 @@ if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then else SAVE_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" +CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/popt -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <]) + +echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 +echo "configure:13854: checking whether struct passwd has pw_comment" >&5 +if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { +struct passwd p; p.pw_comment; +; return 0; } +EOF +if { (eval echo configure:13867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_passwd_pw_comment=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_passwd_pw_comment=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_passwd_pw_comment" 1>&6 +if test x"$samba_cv_passwd_pw_comment" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_PASSWD_PW_COMMENT 1 +EOF + +fi + +#AC_CHECK_MEMBER(struct passwd.pw_age, +# AC_DEFINE(HAVE_PASSWD_PW_AGE, 1, [Defined if struct passwd has pw_age field]), +# [#include ]) + +echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 +echo "configure:13892: checking whether struct passwd has pw_age" >&5 +if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext < +int main() { +struct passwd p; p.pw_age; +; return 0; } +EOF +if { (eval echo configure:13905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_passwd_pw_age=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_passwd_pw_age=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_passwd_pw_age" 1>&6 +if test x"$samba_cv_passwd_pw_age" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_PASSWD_PW_AGE 1 +EOF + +fi + ################################################# # Check to see if we should use the included popt @@ -13859,7 +13940,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13863: checking for poptGetContext in -lpopt" >&5 +echo "configure:13944: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13867,7 +13948,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13963: \"$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 @@ -13902,7 +13983,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13906: checking whether to use included popt" >&5 +echo "configure:13987: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""$srcdir/popt" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13925,16 +14006,16 @@ fi # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:13929: checking configure summary" >&5 +echo "configure:14010: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else diff --git a/source3/configure.in b/source3/configure.in index 7871c54f25..284b06823a 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -1565,7 +1565,7 @@ fi AC_CACHE_CHECK([whether getpass should be replaced],samba_cv_REPLACE_GETPASS,[ SAVE_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" +CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/popt -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper" AC_TRY_COMPILE([ #define REPLACE_GETPASS 1 #define NO_CONFIG_H 1 diff --git a/source3/include/config.h.in b/source3/include/config.h.in index a93f1a48fc..2e25b3a569 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -1,4 +1,4 @@ -/* include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */ +/* include/config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if on AIX 3. System headers sometimes define this. -- cgit