summaryrefslogtreecommitdiff
path: root/src/configure
diff options
context:
space:
mode:
authorMarc G. Fournier1997-02-09 03:23:52 +0000
committerMarc G. Fournier1997-02-09 03:23:52 +0000
commitad6bfe67bd234fec5f78ff274a830a9686645d30 (patch)
tree8cb8a8c4dda7b79f8f3426612201ccf270d489df /src/configure
parentfd84cafb696326326397004d34fbbc650daf8f82 (diff)
Various fixes suggested by Gregor Hoffleit
Add a check to configure for strdup Remove all the '-ltermcap' checks from psql/Makefile Have {psql,pg_dump}/Makefile modified if strdup doesn't exist on the system
Diffstat (limited to 'src/configure')
-rwxr-xr-xsrc/configure78
1 files changed, 64 insertions, 14 deletions
diff --git a/src/configure b/src/configure
index 7dd3d644b5..639943dab2 100755
--- a/src/configure
+++ b/src/configure
@@ -3002,14 +3002,63 @@ else
INET_ATON='inet_aton.o'
fi
+echo $ac_n "checking for strdup""... $ac_c" 1>&6
+echo "configure:3007: checking for strdup" >&5
+if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3012 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char strdup(); 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 strdup();
+
+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_strdup) || defined (__stub___strdup)
+choke me
+#else
+strdup();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_strdup=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_strdup=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ STRDUP='../../utils/strdup.o'
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
-echo "configure:3008: checking for cbrt" >&5
+echo "configure:3057: checking for cbrt" >&5
if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3013 "configure"
+#line 3062 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char cbrt(); below. */
@@ -3032,7 +3081,7 @@ cbrt();
; return 0; }
EOF
-if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_cbrt=yes"
else
@@ -3053,7 +3102,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
-echo "configure:3057: checking for cbrt in -lm" >&5
+echo "configure:3106: checking for cbrt in -lm" >&5
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3061,7 +3110,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3065 "configure"
+#line 3114 "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
@@ -3072,7 +3121,7 @@ int main() {
cbrt()
; return 0; }
EOF
-if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3125: \"$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
@@ -3098,12 +3147,12 @@ fi
fi
echo $ac_n "checking for rint""... $ac_c" 1>&6
-echo "configure:3102: checking for rint" >&5
+echo "configure:3151: checking for rint" >&5
if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3107 "configure"
+#line 3156 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char rint(); below. */
@@ -3126,7 +3175,7 @@ rint();
; return 0; }
EOF
-if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_rint=yes"
else
@@ -3147,7 +3196,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
-echo "configure:3151: checking for rint in -lm" >&5
+echo "configure:3200: checking for rint in -lm" >&5
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3155,7 +3204,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3159 "configure"
+#line 3208 "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
@@ -3166,7 +3215,7 @@ int main() {
rint()
; return 0; }
EOF
-if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3219: \"$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
@@ -3292,7 +3341,7 @@ done
ac_given_srcdir=$srcdir
-trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3352,6 +3401,7 @@ s%@ipcs@%$ipcs%g
s%@ipcrm@%$ipcrm%g
s%@LIBOBJS@%$LIBOBJS%g
s%@INET_ATON@%$INET_ATON%g
+s%@STRDUP@%$STRDUP%g
CEOF
EOF
@@ -3393,7 +3443,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then