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

Commit01cdd04

Browse files
committed
TCL/TK fixes from Billy G. Allie.
1 parent3c4e2bc commit01cdd04

File tree

4 files changed

+102
-119
lines changed

4 files changed

+102
-119
lines changed

‎src/Makefile.global.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.50 1998/10/14 16:02:10 thomas Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.51 1998/10/15 15:58:12 momjian Exp $
1111
#
1212
# NOTES
1313
# Essentially all Postgres make files include this file and use the
@@ -136,7 +136,11 @@ KRBLIBS+= -lkrb5 -lcrypto -lcom_err -lisode
136136
endif
137137
endif
138138

139+
#
140+
# Please do not edit USE_TCL and USE_TK by hand.
141+
#
139142
USE_TCL= @USE_TCL@
143+
USE_TK= @USE_TK@
140144

141145
USE_PERL= @USE_PERL@
142146

‎src/bin/pgtclsh/Makefile

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.21 1998/10/13 16:30:48 momjian Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.22 1998/10/15 15:58:15 momjian Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -17,7 +17,10 @@ include ../../Makefile.global
1717
#
1818
# Include definitions from the tclConfig.sh file
1919
#
20-
include Makefile.tcltkdefs
20+
include Makefile.tcldefs
21+
ifeq ($(USE_TK), true)
22+
include Makefile.tkdefs
23+
endif
2124

2225
CFLAGS+=$(X_CFLAGS) -I$(SRCDIR)/interfaces/libpgtcl
2326

@@ -30,10 +33,23 @@ endif
3033
LIBPGTCL= -L$(SRCDIR)/interfaces/libpgtcl -lpgtcl
3134
LIBPQ= -L$(LIBPQDIR) -lpq
3235

33-
all: pgtclsh pgtksh
36+
# If we are here then TCL is available
37+
PGMS = pgtclsh
38+
INSTPGMS = install_tcl
39+
40+
# Add TK targets if TK is available
41+
ifeq ($(USE_TK), true)
42+
PGMS += pgtksh
43+
INSTPGMS += install_tk
44+
endif
45+
46+
all:$(PGMS)
3447

35-
Makefile.tcltkdefs:
36-
/bin/sh mkMakefile.tcltkdefs.sh
48+
Makefile.tcldefs:
49+
/bin/sh mkMakefile.tcldefs.sh
50+
51+
Makefile.tkdefs:
52+
/bin/sh mkMakefile.tkdefs.sh
3753

3854
pgtclsh: pgtclAppInit.o
3955
$(CC)$(CFLAGS)$(TCL_DEFS) -o$@ pgtclAppInit.o\
@@ -44,8 +60,12 @@ pgtksh: pgtkAppInit.o
4460
$(LIBPGTCL)$(LIBPQ)$(X_LIBS)$(TK_LIB_SPEC)$(TK_LIBS)\
4561
$(TCL_LIB_SPEC)$(X11_LIBS)$(LDFLAGS)
4662

47-
install: pgtclsh pgtksh
63+
install:$(INSTPGMS)
64+
65+
install_tcl: pgtclsh
4866
$(INSTALL)$(INSTL_EXE_OPTS) pgtclsh$(BINDIR)/pgtclsh
67+
68+
install_tk: pgtksh
4969
$(INSTALL)$(INSTL_EXE_OPTS) pgtksh$(BINDIR)/pgtksh
5070

5171
clean:

‎src/bin/pgtclsh/mkMakefile.tcltkdefs.sh.in

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

‎src/configure.in

Lines changed: 71 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -222,35 +222,15 @@ AC_ARG_WITH(
222222
[ --with-tcl use tcl ],
223223
[
224224
case "$withval" in
225-
y | ye | yes)USE_TCL=true; AC_MSG_RESULT(enabled) ;;
226-
*)USE_TCL=false; AC_MSG_RESULT(disabled) ;;
225+
y | ye | yes)USE_TCL=true;USE_TK=true;AC_MSG_RESULT(enabled) ;;
226+
*)USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ;;
227227
esac
228228
],
229-
[ USE_TCL=false; AC_MSG_RESULT(disabled) ]
229+
[ USE_TCL=; USE_TK=; AC_MSG_RESULT(disabled) ]
230230
)
231231

232-
dnl Add tcl/tk candidate directories to CPPFLAGS
233-
if test "$USE_TCL"; then
234-
header_dirs="/usr/include $INCLUDE_DIRS"
235-
tcl_dirs="tcl8.0 tcl80 tcl7.6 tcl76"
236-
tk_dirs="tk8.0 tk4.2"
237-
for dir in $header_dirs; do
238-
for tcl_dir in $tcl_dirs; do
239-
if test -d "$dir/$tcl_dir"; then
240-
PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$dir/$tcl_dir"
241-
fi
242-
done
243-
done
244-
for dir in $header_dirs; do
245-
for tk_dir in $tk_dirs; do
246-
if test -d "$dir/$tk_dir"; then
247-
PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$dir/$tk_dir"
248-
fi
249-
done
250-
done
251-
fi
252232
export USE_TCL
253-
USE_X=$USE_TCL
233+
export USE_TK
254234

255235
dnl We exclude perl support unless we override it with --with-perl
256236
AC_MSG_CHECKING(setting USE_PERL)
@@ -266,9 +246,9 @@ AC_ARG_WITH(
266246
[ USE_PERL=false; AC_MSG_RESULT(disabled) ]
267247
)
268248

269-
#dnl Verify that postgres is already installed
270-
#dnl per instructions for perl interface installation
271-
if test "$USE_PERL" ="true"
249+
dnl Verify that postgres is already installed
250+
dnl per instructions for perl interface installation
251+
if test "$USE_PERL" = true
272252
then
273253
if test "$WHOAMI" != "root"
274254
thenAC_MSG_WARN(perl support disabled; must be root to install)
@@ -411,6 +391,7 @@ AC_SUBST(CFLAGS)
411391
AC_SUBST(DLSUFFIX)
412392
AC_SUBST(DL_LIB)
413393
AC_SUBST(USE_TCL)
394+
AC_SUBST(USE_TK)
414395
AC_SUBST(USE_PERL)
415396
AC_SUBST(USE_ODBC)
416397
AC_SUBST(MULTIBYTE)
@@ -782,6 +763,67 @@ fi
782763
AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $SPECIALMATHLIB)
783764
])
784765

766+
dnl Check for Tcl configuration script tclConfig.sh
767+
768+
AC_PATH_PROG(TCLSH, tclsh)
769+
770+
if test -z "$TCLSH"
771+
then
772+
AC_MSG_WARN(TCL/TK support disabled; tclsh is not in your path)
773+
USE_TCL=
774+
fi
775+
776+
if test "$USE_TCL" = true
777+
then
778+
AC_MSG_CHECKING(for tclConfig.sh)
779+
TCL_CONFIG_SH=
780+
library_dirs=`echo 'puts $auto_path' | $TCLSH`
781+
library_dirs="$LIBRARY_DIRS $library_dirs"
782+
for dir in $library_dirs; do
783+
if test -d "$dir" -a -r "$dir/tclConfig.sh"; then
784+
TCL_CONFIG_SH=$dir/tclConfig.sh
785+
break
786+
fi
787+
done
788+
if test -z "$TCL_CONFIG_SH"; then
789+
AC_MSG_RESULT(no)
790+
AC_MSG_WARN(TCL/TK support disabled; Tcl configuration script missing)
791+
USE_TCL=
792+
else
793+
AC_MSG_RESULT($TCL_CONFIG_SH)
794+
AC_SUBST(TCL_CONFIG_SH)
795+
fi
796+
fi
797+
798+
USE_TK=$USE_TCL# If TCL is disabled, disable TK
799+
800+
dnl Check for Tk configuration script tkConfig.sh
801+
if test "$USE_TK" = true
802+
then
803+
AC_MSG_CHECKING(for tkConfig.sh)
804+
TK_CONFIG_SH=
805+
# library_dirs are set in the check for TCL
806+
for dir in $library_dirs
807+
do
808+
if test -d "$dir" -a -r "$dir/tkConfig.sh"
809+
then
810+
TK_CONFIG_SH=$dir/tkConfig.sh
811+
break
812+
fi
813+
done
814+
if test -z "$TK_CONFIG_SH"
815+
then
816+
AC_MSG_RESULT(no)
817+
AC_MSG_WARN(TK support disabled; Tk configuration script missing)
818+
USE_TK=
819+
else
820+
AC_MSG_RESULT($TK_CONFIG_SH)
821+
AC_SUBST(TK_CONFIG_SH)
822+
fi
823+
fi
824+
825+
USE_X=$USE_TK
826+
785827
dnl Check for X libraries
786828

787829
if test "$USE_X" = true; then
@@ -819,64 +861,6 @@ if test "$USE_X" = true; then
819861
LDFLAGS="$ice_save_LDFLAGS"
820862
fi
821863

822-
dnl Check for Tcl configuration script tclConfig.sh
823-
if test "$USE_TCL"; then
824-
AC_MSG_CHECKING(for tclConfig.sh)
825-
library_dirs="$LIBRARY_DIRS /usr/lib"
826-
TCL_CONFIG_SH=
827-
for dir in $library_dirs; do
828-
for tcl_dir in $tcl_dirs; do
829-
if test -z "$TCL_CONFIG_SH"; then
830-
if test -d "$dir/$tcl_dir" -a -r "$dir/$tcl_dir/tclConfig.sh"; then
831-
TCL_CONFIG_SH=$dir/$tcl_dir/tclConfig.sh
832-
fi
833-
fi
834-
done
835-
if test -z "$TCL_CONFIG_SH"; then
836-
if test -d "$dir" -a -r "$dir/tclConfig.sh"; then
837-
TCL_CONFIG_SH=$dir/tclConfig.sh
838-
fi
839-
fi
840-
done
841-
if test -z "$TCL_CONFIG_SH"; then
842-
AC_MSG_RESULT(no)
843-
AC_MSG_WARN(tcl support disabled; Tcl configuration script missing)
844-
USE_TCL=
845-
else
846-
AC_MSG_RESULT($TCL_CONFIG_SH)
847-
AC_SUBST(TCL_CONFIG_SH)
848-
fi
849-
fi
850-
851-
dnl Check for Tk configuration script tkConfig.sh
852-
if test "$USE_TCL"; then
853-
AC_MSG_CHECKING(for tkConfig.sh)
854-
library_dirs="$LIBRARY_DIRS /usr/lib"
855-
TK_CONFIG_SH=
856-
for dir in $library_dirs; do
857-
for tk_dir in $tk_dirs; do
858-
if test -z "$TK_CONFIG_SH"; then
859-
if test -d "$dir/$tk_dir" -a -r "$dir/$tk_dir/tkConfig.sh"; then
860-
TK_CONFIG_SH=$dir/$tk_dir/tkConfig.sh
861-
fi
862-
fi
863-
done
864-
if test -z "$TK_CONFIG_SH"; then
865-
if test -d "$dir" -a -r "$dir/tkConfig.sh"; then
866-
TK_CONFIG_SH=$dir/tkConfig.sh
867-
fi
868-
fi
869-
done
870-
if test -z "$TK_CONFIG_SH"; then
871-
AC_MSG_RESULT(no)
872-
AC_MSG_WARN(tcl support disabled; Tk configuration script missing)
873-
USE_TCL=
874-
else
875-
AC_MSG_RESULT($TK_CONFIG_SH)
876-
AC_SUBST(TK_CONFIG_SH)
877-
fi
878-
fi
879-
880864
dnl cause configure to recurse into subdirectories with their own configure
881865
dnl Darn, setting AC_CONFIG_SUBDIRS sets a list $subdirs$ in the configure output
882866
dnl file, but then configure doesn't bother using that list. Probably a bug in
@@ -909,7 +893,8 @@ AC_OUTPUT(
909893
bin/pg_dump/Makefile
910894
bin/pg_version/Makefile
911895
bin/psql/Makefile
912-
bin/pgtclsh/mkMakefile.tcltkdefs.sh
896+
bin/pgtclsh/mkMakefile.tcldefs.sh
897+
bin/pgtclsh/mkMakefile.tkdefs.sh
913898
include/version.h
914899
interfaces/libpq/Makefile
915900
interfaces/ecpg/lib/Makefile

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp