mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-11-27 02:22:00 +08:00
Use more robust AC_PROG_SHTOOL instead of homegrown check
This commit is contained in:
parent
dd6666d420
commit
ad640d3616
38
aclocal.m4
vendored
38
aclocal.m4
vendored
@ -26,6 +26,44 @@ dnl
|
||||
divert(-1)
|
||||
builtin(include, build/openldap.m4)dnl
|
||||
|
||||
|
||||
AC_DEFUN(AC_PROG_SHTOOL,[dnl
|
||||
AC_PREREQ(2.13)dnl
|
||||
AC_MSG_CHECKING([for GNU shtool])
|
||||
AC_CACHE_VAL(ac_cv_shtool,[dnl
|
||||
# canonicalize and split path string
|
||||
ac_paths="`echo .:$ac_aux_dir:$PATH |\
|
||||
sed -e 's%/*:%:%g' -e 's%/*$%%' \
|
||||
-e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
|
||||
-e 's/:/ /g'`"
|
||||
# iterate over $PATH but prefer CWD
|
||||
ac_cv_shtool=""
|
||||
for ac_path in $ac_paths; do
|
||||
if test -f "$ac_path/shtool" && test ! -d "$ac_path/shtool"; then
|
||||
ac_cv_shtool="$ac_path/shtool"
|
||||
break
|
||||
fi
|
||||
done
|
||||
# check for existance
|
||||
if test ".$ac_cv_shtool" = .; then
|
||||
AC_MSG_ERROR([no shtool found in .:$PATH])
|
||||
fi
|
||||
# check deeper
|
||||
ac_rc=`($ac_cv_shtool --version) </dev/null 2>/dev/null | grep 'GNU shtool'`
|
||||
if test ".$ac_rc" = .; then
|
||||
ac_cv_shtool="${CONFIG_SHELL-/bin/sh} $ac_cv_shtool"
|
||||
ac_rc=`($ac_cv_shtool --version) </dev/null 2>/dev/null | grep 'GNU shtool'`
|
||||
if test ".$ac_rc" = .; then
|
||||
AC_MSG_ERROR([$ac_cv_shtool seems not to be GNU shtool])
|
||||
fi
|
||||
fi
|
||||
])dnl
|
||||
AC_MSG_RESULT([$ac_cv_shtool])
|
||||
SHTOOL="$ac_cv_shtool"
|
||||
AC_SUBST(SHTOOL)
|
||||
])
|
||||
|
||||
|
||||
# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
|
||||
|
||||
# serial 46 AC_PROG_LIBTOOL
|
||||
|
52
configure
vendored
52
configure
vendored
@ -478,7 +478,7 @@ ac_includes_default="\
|
||||
# include <unistd.h>
|
||||
#endif"
|
||||
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OPENLDAP_PACKAGE OPENLDAP_VERSION OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP LIBTOOL LN_H PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_LDAP BUILD_LDBM BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_TCL BUILD_BDB_DYNAMIC BUILD_DNSSRV_DYNAMIC BUILD_LDAP_DYNAMIC BUILD_LDBM_DYNAMIC BUILD_META_DYNAMIC BUILD_MONITOR_DYNAMIC BUILD_NULL_DYNAMIC BUILD_PASSWD_DYNAMIC BUILD_PERL_DYNAMIC BUILD_SHELL_DYNAMIC BUILD_SQL_DYNAMIC BUILD_TCL_DYNAMIC BUILD_SLURPD LDAP_LIBS LDIF_LIBS SLAPD_LIBS SLURPD_LIBS LDBM_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS MOD_TCL_LIB SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS READLINE_LIBS SASL_LIBS TERMCAP_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS SLAPD_SLP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS'
|
||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SHTOOL build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OPENLDAP_PACKAGE OPENLDAP_VERSION OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP LIBTOOL LN_H PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_LDAP BUILD_LDBM BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_TCL BUILD_BDB_DYNAMIC BUILD_DNSSRV_DYNAMIC BUILD_LDAP_DYNAMIC BUILD_LDBM_DYNAMIC BUILD_META_DYNAMIC BUILD_MONITOR_DYNAMIC BUILD_NULL_DYNAMIC BUILD_PASSWD_DYNAMIC BUILD_PERL_DYNAMIC BUILD_SHELL_DYNAMIC BUILD_SQL_DYNAMIC BUILD_TCL_DYNAMIC BUILD_SLURPD LDAP_LIBS LDIF_LIBS SLAPD_LIBS SLURPD_LIBS LDBM_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS MOD_TCL_LIB SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS READLINE_LIBS SASL_LIBS TERMCAP_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS SLAPD_SLP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS'
|
||||
ac_subst_files=''
|
||||
|
||||
# Initialize some variables set by options.
|
||||
@ -1545,16 +1545,49 @@ echo "$as_me: error: could not determine version" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
|
||||
if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
|
||||
ac_cv_shtool="$ac_aux_dir/shtool"
|
||||
echo "$as_me:$LINENO: checking for GNU shtool" >&5
|
||||
echo $ECHO_N "checking for GNU shtool... $ECHO_C" >&6
|
||||
if test "${ac_cv_shtool+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
{ { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
|
||||
echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
|
||||
# canonicalize and split path string
|
||||
ac_paths="`echo .:$ac_aux_dir:$PATH |\
|
||||
sed -e 's%/*:%:%g' -e 's%/*$%%' \
|
||||
-e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
|
||||
-e 's/:/ /g'`"
|
||||
# iterate over $PATH but prefer CWD
|
||||
ac_cv_shtool=""
|
||||
for ac_path in $ac_paths; do
|
||||
if test -f "$ac_path/shtool" && test ! -d "$ac_path/shtool"; then
|
||||
ac_cv_shtool="$ac_path/shtool"
|
||||
break
|
||||
fi
|
||||
done
|
||||
# check for existance
|
||||
if test ".$ac_cv_shtool" = .; then
|
||||
{ { echo "$as_me:$LINENO: error: no shtool found in .:$PATH" >&5
|
||||
echo "$as_me: error: no shtool found in .:$PATH" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
# check deeper
|
||||
ac_rc=`($ac_cv_shtool --version) </dev/null 2>/dev/null | grep 'GNU shtool'`
|
||||
if test ".$ac_rc" = .; then
|
||||
ac_cv_shtool="${CONFIG_SHELL-/bin/sh} $ac_cv_shtool"
|
||||
ac_rc=`($ac_cv_shtool --version) </dev/null 2>/dev/null | grep 'GNU shtool'`
|
||||
if test ".$ac_rc" = .; then
|
||||
{ { echo "$as_me:$LINENO: error: $ac_cv_shtool seems not to be GNU shtool" >&5
|
||||
echo "$as_me: error: $ac_cv_shtool seems not to be GNU shtool" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_shtool" >&5
|
||||
echo "${ECHO_T}$ac_cv_shtool" >&6
|
||||
SHTOOL="$ac_cv_shtool"
|
||||
|
||||
|
||||
|
||||
TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
|
||||
TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
|
||||
|
||||
@ -6150,7 +6183,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
|
||||
case $host in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 6153 "configure"' > conftest.$ac_ext
|
||||
echo '#line 6186 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@ -6679,7 +6712,7 @@ chmod -w .
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
|
||||
compiler_c_o=no
|
||||
if { (eval echo configure:6682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
|
||||
if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
if test -s out/conftest.err; then
|
||||
@ -8511,7 +8544,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 8514 "configure"
|
||||
#line 8547 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -8609,7 +8642,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 8612 "configure"
|
||||
#line 8645 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -34131,6 +34164,7 @@ s,@ECHO_C@,$ECHO_C,;t t
|
||||
s,@ECHO_N@,$ECHO_N,;t t
|
||||
s,@ECHO_T@,$ECHO_T,;t t
|
||||
s,@LIBS@,$LIBS,;t t
|
||||
s,@SHTOOL@,$SHTOOL,;t t
|
||||
s,@build@,$build,;t t
|
||||
s,@build_cpu@,$build_cpu,;t t
|
||||
s,@build_vendor@,$build_vendor,;t t
|
||||
|
@ -30,14 +30,7 @@ if test -z "$OL_STRING"; then
|
||||
AC_MSG_ERROR([could not determine version])
|
||||
fi
|
||||
|
||||
if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
|
||||
ac_cv_shtool="$ac_aux_dir/shtool"
|
||||
else
|
||||
AC_MSG_ERROR([no shtool found in $ac_aux_dir])
|
||||
fi
|
||||
|
||||
SHTOOL="$ac_cv_shtool"
|
||||
dnl AC_SUBST(SHTOOL)dnl
|
||||
AC_PROG_SHTOOL
|
||||
|
||||
TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
|
||||
TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
|
||||
|
Loading…
Reference in New Issue
Block a user