configure.in cleanup for tr and strerror2.
This commit is contained in:
parent
775098bd28
commit
cdc2c06386
92
src/configure
vendored
92
src/configure
vendored
@ -1506,8 +1506,8 @@ done
|
|||||||
test -n "$TR" || TR="NOT_FOUND"
|
test -n "$TR" || TR="NOT_FOUND"
|
||||||
|
|
||||||
|
|
||||||
TRSTRINGS=`echo ABCdef | $TR "'[a-z]' '[A-Z]'" | grep ABCDEF`
|
TRSTRINGS=`echo ABCdef | $TR 'a-z' 'A-Z' 2>/dev/null | grep ABCDEF`
|
||||||
TRCLASS=`echo ABCdef | $TR "[:lower:]" "[:upper:]" | grep ABCDEF`
|
TRCLASS=`echo ABCdef | $TR ':lower:' ':upper:' 2>/dev/null | grep ABCDEF`
|
||||||
|
|
||||||
if test "$TRSTRINGS" = "ABCDEF"; then
|
if test "$TRSTRINGS" = "ABCDEF"; then
|
||||||
TRARGS="'[a-z]' '[A-Z]'"
|
TRARGS="'[a-z]' '[A-Z]'"
|
||||||
@ -3580,17 +3580,65 @@ else
|
|||||||
STRERROR='strerror.o'
|
STRERROR='strerror.o'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eC_CHECK_FUNC(strerror, cat >> confdefs.h <<\EOF
|
echo $ac_n "checking for strerror""... $ac_c" 1>&6
|
||||||
|
echo "configure:3585: checking for strerror" >&5
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 3590 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
|
which can conflict with char strerror(); 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 strerror();
|
||||||
|
|
||||||
|
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_strerror) || defined (__stub___strerror)
|
||||||
|
choke me
|
||||||
|
#else
|
||||||
|
strerror();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
; return 0; }
|
||||||
|
EOF
|
||||||
|
if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_func_strerror=yes"
|
||||||
|
else
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_func_strerror=no"
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
fi
|
||||||
|
|
||||||
|
if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
cat >> confdefs.h <<\EOF
|
||||||
#define HAVE_STRERROR 1
|
#define HAVE_STRERROR 1
|
||||||
EOF
|
EOF
|
||||||
, STRERROR2='../../backend/port/strerror.o')
|
|
||||||
|
else
|
||||||
|
echo "$ac_t""no" 1>&6
|
||||||
|
STRERROR2='../../backend/port/strerror.o'
|
||||||
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for strdup""... $ac_c" 1>&6
|
echo $ac_n "checking for strdup""... $ac_c" 1>&6
|
||||||
echo "configure:3589: checking for strdup" >&5
|
echo "configure:3637: checking for strdup" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 3594 "configure"
|
#line 3642 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char strdup(); below. */
|
which can conflict with char strdup(); below. */
|
||||||
@ -3613,7 +3661,7 @@ strdup();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_strdup=yes"
|
eval "ac_cv_func_strdup=yes"
|
||||||
else
|
else
|
||||||
@ -3641,12 +3689,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
|
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
|
||||||
echo "configure:3645: checking for cbrt" >&5
|
echo "configure:3693: checking for cbrt" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 3650 "configure"
|
#line 3698 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char cbrt(); below. */
|
which can conflict with char cbrt(); below. */
|
||||||
@ -3669,7 +3717,7 @@ cbrt();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_cbrt=yes"
|
eval "ac_cv_func_cbrt=yes"
|
||||||
else
|
else
|
||||||
@ -3690,7 +3738,7 @@ EOF
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
|
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
|
||||||
echo "configure:3694: checking for cbrt in -lm" >&5
|
echo "configure:3742: checking for cbrt in -lm" >&5
|
||||||
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -3698,7 +3746,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lm $LIBS"
|
LIBS="-lm $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 3702 "configure"
|
#line 3750 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@ -3709,7 +3757,7 @@ int main() {
|
|||||||
cbrt()
|
cbrt()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -3735,12 +3783,12 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for rint""... $ac_c" 1>&6
|
echo $ac_n "checking for rint""... $ac_c" 1>&6
|
||||||
echo "configure:3739: checking for rint" >&5
|
echo "configure:3787: checking for rint" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 3744 "configure"
|
#line 3792 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char rint(); below. */
|
which can conflict with char rint(); below. */
|
||||||
@ -3763,7 +3811,7 @@ rint();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_rint=yes"
|
eval "ac_cv_func_rint=yes"
|
||||||
else
|
else
|
||||||
@ -3784,7 +3832,7 @@ EOF
|
|||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
|
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
|
||||||
echo "configure:3788: checking for rint in -lm" >&5
|
echo "configure:3836: checking for rint in -lm" >&5
|
||||||
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -3792,7 +3840,7 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lm $LIBS"
|
LIBS="-lm $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 3796 "configure"
|
#line 3844 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
@ -3803,7 +3851,7 @@ int main() {
|
|||||||
rint()
|
rint()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -3830,7 +3878,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking setting USE_LOCALE""... $ac_c" 1>&6
|
echo $ac_n "checking setting USE_LOCALE""... $ac_c" 1>&6
|
||||||
echo "configure:3834: checking setting USE_LOCALE" >&5
|
echo "configure:3882: checking setting USE_LOCALE" >&5
|
||||||
if test "$USE_LOCALE" = "yes"
|
if test "$USE_LOCALE" = "yes"
|
||||||
then
|
then
|
||||||
echo "$ac_t""enabled" 1>&6
|
echo "$ac_t""enabled" 1>&6
|
||||||
@ -3842,14 +3890,14 @@ else
|
|||||||
echo "$ac_t""disabled" 1>&6
|
echo "$ac_t""disabled" 1>&6
|
||||||
fi
|
fi
|
||||||
echo $ac_n "checking setting DEF_PGPORT""... $ac_c" 1>&6
|
echo $ac_n "checking setting DEF_PGPORT""... $ac_c" 1>&6
|
||||||
echo "configure:3846: checking setting DEF_PGPORT" >&5
|
echo "configure:3894: checking setting DEF_PGPORT" >&5
|
||||||
cat >> confdefs.h <<EOF
|
cat >> confdefs.h <<EOF
|
||||||
#define DEF_PGPORT "${DEF_PGPORT}"
|
#define DEF_PGPORT "${DEF_PGPORT}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "$ac_t""$DEF_PGPORT" 1>&6
|
echo "$ac_t""$DEF_PGPORT" 1>&6
|
||||||
echo $ac_n "checking setting HBA""... $ac_c" 1>&6
|
echo $ac_n "checking setting HBA""... $ac_c" 1>&6
|
||||||
echo "configure:3853: checking setting HBA" >&5
|
echo "configure:3901: checking setting HBA" >&5
|
||||||
if test "$NOHBA" = "no"
|
if test "$NOHBA" = "no"
|
||||||
then
|
then
|
||||||
echo "$ac_t""enabled" 1>&6
|
echo "$ac_t""enabled" 1>&6
|
||||||
|
@ -314,8 +314,8 @@ AC_PATH_PROG(ipcrm, ipcrm)
|
|||||||
AC_PATH_PROGS(TR, trbsd tr, NOT_FOUND)
|
AC_PATH_PROGS(TR, trbsd tr, NOT_FOUND)
|
||||||
|
|
||||||
dnl Check tr flags to convert from lower to upper case
|
dnl Check tr flags to convert from lower to upper case
|
||||||
TRSTRINGS=`echo ABCdef | $TR "'[[a-z]]' '[[A-Z]]'" | grep ABCDEF`
|
TRSTRINGS=`echo ABCdef | $TR '[a-z]' '[A-Z]' 2>/dev/null | grep ABCDEF`
|
||||||
TRCLASS=`echo ABCdef | $TR "[[:lower:]]" "[[:upper:]]" | grep ABCDEF`
|
TRCLASS=`echo ABCdef | $TR '[:lower:]' '[:upper:]' 2>/dev/null | grep ABCDEF`
|
||||||
|
|
||||||
if test "$TRSTRINGS" = "ABCDEF"; then
|
if test "$TRSTRINGS" = "ABCDEF"; then
|
||||||
TRARGS="'[[a-z]]' '[[A-Z]]'"
|
TRARGS="'[[a-z]]' '[[A-Z]]'"
|
||||||
@ -413,7 +413,7 @@ AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
|
|||||||
AC_CHECK_FUNCS(sigprocmask waitpid setsid random fcvt)
|
AC_CHECK_FUNCS(sigprocmask waitpid setsid random fcvt)
|
||||||
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
|
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
|
||||||
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), STRERROR='strerror.o')
|
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), STRERROR='strerror.o')
|
||||||
eC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), STRERROR2='../../backend/port/strerror.o')
|
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), STRERROR2='../../backend/port/strerror.o')
|
||||||
AC_CHECK_FUNC(strdup, AC_DEFINE(HAVE_STRDUP), STRDUP='../../utils/strdup.o')
|
AC_CHECK_FUNC(strdup, AC_DEFINE(HAVE_STRDUP), STRDUP='../../utils/strdup.o')
|
||||||
AC_SUBST(STRDUP)
|
AC_SUBST(STRDUP)
|
||||||
AC_SUBST(INET_ATON)
|
AC_SUBST(INET_ATON)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user