Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad6bfe6

Browse files
committed
Various fixes suggested by Gregor Hoffleit
Add a check to configure for strdupRemove all the '-ltermcap' checks from psql/MakefileHave {psql,pg_dump}/Makefile modified if strdup doesn't exist on the system
1 parentfd84caf commitad6bfe6

File tree

5 files changed

+119
-108
lines changed

5 files changed

+119
-108
lines changed

‎src/bin/pg_dump/Makefilerenamed to‎src/bin/pg_dump/Makefile.in

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.13 1997/02/06 02:31:05 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/Makefile.in,v 1.1 1997/02/09 03:23:23 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

1414
SRCDIR= ../..
1515
include ../../Makefile.global
1616
include ../Makefile.global
1717

18-
OBJS= pg_dump.o common.o
19-
20-
ifeq ($(PORTNAME), ultrix4)
21-
OBJS+= ../../utils/strdup.o
22-
endif
18+
OBJS= pg_dump.o common.o @STRDUP@
2319

2420
all: submake pg_dump
2521

‎src/bin/psql/Makefile

Lines changed: 0 additions & 87 deletions
This file was deleted.

‎src/bin/psql/Makefile.in

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#-------------------------------------------------------------------------
2+
#
3+
# Makefile.inc--
4+
# Makefile for bin/psql
5+
#
6+
# Copyright (c) 1994, Regents of the University of California
7+
#
8+
#
9+
# IDENTIFICATION
10+
# $Header: /cvsroot/pgsql/src/bin/psql/Attic/Makefile.in,v 1.3 1997/02/09 03:23:52 scrappy Exp $
11+
#
12+
#-------------------------------------------------------------------------
13+
14+
SRCDIR= ../..
15+
include ../../Makefile.global
16+
17+
INCLUDE_OPT:= -I$(LIBPQDIR)\
18+
-I../../include
19+
20+
CFLAGS+=$(INCLUDE_OPT)
21+
22+
OBJS= psql.o stringutils.o @STRDUP@
23+
24+
all: submake psql
25+
26+
psql:$(OBJS)$(LIBPQDIR)/libpq.a
27+
$(CC)$(LDFLAGS) -o psql -L$(LIBPQDIR)$(OBJS) -lpq$(LD_ADD)
28+
29+
../../utils/strdup.o:
30+
$(MAKE) -C ../../utils strdup.o
31+
32+
.PHONY: submake
33+
submake:
34+
$(MAKE) -C$(LIBPQDIR) libpq.a
35+
36+
install: psql
37+
$(INSTALL)$(INSTL_EXE_OPTS) psql$(DESTDIR)$(BINDIR)/psql
38+
39+
dependdep:
40+
$(CC) -MM$(INCLUDE_OPT)*.c>depend
41+
42+
clean:
43+
rm -f psql$(OBJS)
44+
45+
ifeq (depend,$(wildcard depend))
46+
include depend
47+
endif
48+
49+
50+

‎src/configure

Lines changed: 64 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3002,14 +3002,63 @@ else
30023002
INET_ATON='inet_aton.o'
30033003
fi
30043004

3005+
echo$ac_n"checking for strdup""...$ac_c"1>&6
3006+
echo"configure:3007: checking for strdup">&5
3007+
ifeval"test\"`echo'$''{'ac_cv_func_strdup'+set}'`\" = set";then
3008+
echo$ac_n"(cached)$ac_c"1>&6
3009+
else
3010+
cat> conftest.$ac_ext<<EOF
3011+
#line 3012 "configure"
3012+
#include "confdefs.h"
3013+
/* System header to define __stub macros and hopefully few prototypes,
3014+
which can conflict with char strdup(); below. */
3015+
#include <assert.h>
3016+
/* Override any gcc2 internal prototype to avoid an error. */
3017+
/* We use char because int might match the return type of a gcc2
3018+
builtin and then its argument prototype would still apply. */
3019+
char strdup();
3020+
3021+
int main() {
3022+
3023+
/* The GNU C library defines this for functions which it implements
3024+
to always fail with ENOSYS. Some functions are actually named
3025+
something starting with __ and the normal name is an alias. */
3026+
#if defined (__stub_strdup) || defined (__stub___strdup)
3027+
choke me
3028+
#else
3029+
strdup();
3030+
#endif
3031+
3032+
; return 0; }
3033+
EOF
3034+
if { (evalecho configure:3035:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3035+
rm -rf conftest*
3036+
eval"ac_cv_func_strdup=yes"
3037+
else
3038+
echo"configure: failed program was:">&5
3039+
cat conftest.$ac_ext>&5
3040+
rm -rf conftest*
3041+
eval"ac_cv_func_strdup=no"
3042+
fi
3043+
rm -f conftest*
3044+
fi
3045+
3046+
ifeval"test\"`echo'$ac_cv_func_'strdup`\" = yes";then
3047+
echo"$ac_t""yes"1>&6
3048+
STRDUP='../../utils/strdup.o'
3049+
else
3050+
echo"$ac_t""no"1>&6
3051+
fi
3052+
3053+
30053054

30063055
echo$ac_n"checking for cbrt""...$ac_c"1>&6
3007-
echo"configure:3008: checking for cbrt">&5
3056+
echo"configure:3057: checking for cbrt">&5
30083057
ifeval"test\"`echo'$''{'ac_cv_func_cbrt'+set}'`\" = set";then
30093058
echo$ac_n"(cached)$ac_c"1>&6
30103059
else
30113060
cat> conftest.$ac_ext<<EOF
3012-
#line3013 "configure"
3061+
#line3062 "configure"
30133062
#include "confdefs.h"
30143063
/* System header to define __stub macros and hopefully few prototypes,
30153064
which can conflict with char cbrt(); below. */
@@ -3032,7 +3081,7 @@ cbrt();
30323081
30333082
; return 0; }
30343083
EOF
3035-
if { (evalecho configure:3036:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3084+
if { (evalecho configure:3085:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
30363085
rm -rf conftest*
30373086
eval"ac_cv_func_cbrt=yes"
30383087
else
@@ -3053,15 +3102,15 @@ EOF
30533102
else
30543103
echo"$ac_t""no"1>&6
30553104
echo$ac_n"checking for cbrt in -lm""...$ac_c"1>&6
3056-
echo"configure:3057: checking for cbrt in -lm">&5
3105+
echo"configure:3106: checking for cbrt in -lm">&5
30573106
ac_lib_var=`echo m'_'cbrt| sed'y%./+-%__p_%'`
30583107
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
30593108
echo$ac_n"(cached)$ac_c"1>&6
30603109
else
30613110
ac_save_LIBS="$LIBS"
30623111
LIBS="-lm$LIBS"
30633112
cat> conftest.$ac_ext<<EOF
3064-
#line3065 "configure"
3113+
#line3114 "configure"
30653114
#include "confdefs.h"
30663115
/* Override any gcc2 internal prototype to avoid an error. */
30673116
/* We use char because int might match the return type of a gcc2
@@ -3072,7 +3121,7 @@ int main() {
30723121
cbrt()
30733122
; return 0; }
30743123
EOF
3075-
if { (evalecho configure:3076:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3124+
if { (evalecho configure:3125:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
30763125
rm -rf conftest*
30773126
eval"ac_cv_lib_$ac_lib_var=yes"
30783127
else
@@ -3098,12 +3147,12 @@ fi
30983147
fi
30993148

31003149
echo$ac_n"checking for rint""...$ac_c"1>&6
3101-
echo"configure:3102: checking for rint">&5
3150+
echo"configure:3151: checking for rint">&5
31023151
ifeval"test\"`echo'$''{'ac_cv_func_rint'+set}'`\" = set";then
31033152
echo$ac_n"(cached)$ac_c"1>&6
31043153
else
31053154
cat> conftest.$ac_ext<<EOF
3106-
#line3107 "configure"
3155+
#line3156 "configure"
31073156
#include "confdefs.h"
31083157
/* System header to define __stub macros and hopefully few prototypes,
31093158
which can conflict with char rint(); below. */
@@ -3126,7 +3175,7 @@ rint();
31263175
31273176
; return 0; }
31283177
EOF
3129-
if { (evalecho configure:3130:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3178+
if { (evalecho configure:3179:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
31303179
rm -rf conftest*
31313180
eval"ac_cv_func_rint=yes"
31323181
else
@@ -3147,15 +3196,15 @@ EOF
31473196
else
31483197
echo"$ac_t""no"1>&6
31493198
echo$ac_n"checking for rint in -lm""...$ac_c"1>&6
3150-
echo"configure:3151: checking for rint in -lm">&5
3199+
echo"configure:3200: checking for rint in -lm">&5
31513200
ac_lib_var=`echo m'_'rint| sed'y%./+-%__p_%'`
31523201
ifeval"test\"`echo'$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set";then
31533202
echo$ac_n"(cached)$ac_c"1>&6
31543203
else
31553204
ac_save_LIBS="$LIBS"
31563205
LIBS="-lm$LIBS"
31573206
cat> conftest.$ac_ext<<EOF
3158-
#line3159 "configure"
3207+
#line3208 "configure"
31593208
#include "confdefs.h"
31603209
/* Override any gcc2 internal prototype to avoid an error. */
31613210
/* We use char because int might match the return type of a gcc2
@@ -3166,7 +3215,7 @@ int main() {
31663215
rint()
31673216
; return 0; }
31683217
EOF
3169-
if { (evalecho configure:3170:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
3218+
if { (evalecho configure:3219:\"$ac_link\")1>&5; (eval$ac_link)2>&5; }&&test -s conftest;then
31703219
rm -rf conftest*
31713220
eval"ac_cv_lib_$ac_lib_var=yes"
31723221
else
@@ -3292,7 +3341,7 @@ done
32923341
32933342
ac_given_srcdir=$srcdir
32943343
3295-
trap 'rm -fr`echo"GNUmakefile Makefile.global backend/port/Makefile include/config.h"| sed"s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3344+
trap 'rm -fr`echo"GNUmakefile Makefile.global backend/port/Makefilebin/psql/Makefile bin/pg_dump/Makefileinclude/config.h"| sed"s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
32963345
EOF
32973346
cat>>$CONFIG_STATUS<<EOF
32983347
@@ -3352,6 +3401,7 @@ s%@ipcs@%$ipcs%g
33523401
s%@ipcrm@%$ipcrm%g
33533402
s%@LIBOBJS@%$LIBOBJS%g
33543403
s%@INET_ATON@%$INET_ATON%g
3404+
s%@STRDUP@%$STRDUP%g
33553405
33563406
CEOF
33573407
EOF
@@ -3393,7 +3443,7 @@ EOF
33933443

33943444
cat>>$CONFIG_STATUS<<EOF
33953445
3396-
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile"}
3446+
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile"}
33973447
EOF
33983448
cat>>$CONFIG_STATUS<<\EOF
33993449
for ac_file in ..$CONFIG_FILES; do if test "x$ac_file" != x..; then

‎src/configure.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ AC_TYPE_SIGNAL
156156
AC_FUNC_VPRINTF
157157
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
158158
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
159+
AC_CHECK_FUNC(strdup, STRDUP='../../utils/strdup.o')
159160
AC_SUBST(INET_ATON)
161+
AC_SUBST(STRDUP)
160162
AC_CHECK_FUNC(cbrt, AC_DEFINE(HAVE_CBRT), AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))
161163
AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT)))
162164

163-
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile)
165+
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp