Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8ec9608

Browse files
committed
Cause configure --with-tcl to check for presence of <tcl.h>, as per
gripe from John Gray. Also fix thinko in pltcl Makefile: if a special Tcl include directory is specified, that ought to be searched first.
1 parent d0c01f2 commit 8ec9608

File tree

3 files changed

+123
-4
lines changed

3 files changed

+123
-4
lines changed

configure

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18494,7 +18494,121 @@ eval TCL_LIBS=\"$TCL_LIBS\"
1849418494
eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
1849518495
eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
1849618496

18497-
fi
18497+
# now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18498+
ac_save_CPPFLAGS=$CPPFLAGS
18499+
CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18500+
if test "${ac_cv_header_tcl_h+set}" = set; then
18501+
echo "$as_me:$LINENO: checking for tcl.h" >&5
18502+
echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
18503+
if test "${ac_cv_header_tcl_h+set}" = set; then
18504+
echo $ECHO_N "(cached) $ECHO_C" >&6
18505+
fi
18506+
echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
18507+
echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
18508+
else
18509+
# Is the header compilable?
18510+
echo "$as_me:$LINENO: checking tcl.h usability" >&5
18511+
echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
18512+
cat >conftest.$ac_ext <<_ACEOF
18513+
#line $LINENO "configure"
18514+
#include "confdefs.h"
18515+
$ac_includes_default
18516+
#include <tcl.h>
18517+
_ACEOF
18518+
rm -f conftest.$ac_objext
18519+
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18520+
(eval $ac_compile) 2>&5
18521+
ac_status=$?
18522+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18523+
(exit $ac_status); } &&
18524+
{ ac_try='test -s conftest.$ac_objext'
18525+
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18526+
(eval $ac_try) 2>&5
18527+
ac_status=$?
18528+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18529+
(exit $ac_status); }; }; then
18530+
ac_header_compiler=yes
18531+
else
18532+
echo "$as_me: failed program was:" >&5
18533+
cat conftest.$ac_ext >&5
18534+
ac_header_compiler=no
18535+
fi
18536+
rm -f conftest.$ac_objext conftest.$ac_ext
18537+
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18538+
echo "${ECHO_T}$ac_header_compiler" >&6
18539+
18540+
# Is the header present?
18541+
echo "$as_me:$LINENO: checking tcl.h presence" >&5
18542+
echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
18543+
cat >conftest.$ac_ext <<_ACEOF
18544+
#line $LINENO "configure"
18545+
#include "confdefs.h"
18546+
#include <tcl.h>
18547+
_ACEOF
18548+
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18549+
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18550+
ac_status=$?
18551+
egrep -v '^ *\+' conftest.er1 >conftest.err
18552+
rm -f conftest.er1
18553+
cat conftest.err >&5
18554+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
18555+
(exit $ac_status); } >/dev/null; then
18556+
if test -s conftest.err; then
18557+
ac_cpp_err=$ac_c_preproc_warn_flag
18558+
else
18559+
ac_cpp_err=
18560+
fi
18561+
else
18562+
ac_cpp_err=yes
18563+
fi
18564+
if test -z "$ac_cpp_err"; then
18565+
ac_header_preproc=yes
18566+
else
18567+
echo "$as_me: failed program was:" >&5
18568+
cat conftest.$ac_ext >&5
18569+
ac_header_preproc=no
18570+
fi
18571+
rm -f conftest.err conftest.$ac_ext
18572+
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18573+
echo "${ECHO_T}$ac_header_preproc" >&6
18574+
18575+
# So? What about this header?
18576+
case $ac_header_compiler:$ac_header_preproc in
18577+
yes:no )
18578+
{ echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
18579+
echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18580+
{ echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
18581+
echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;};;
18582+
no:yes )
18583+
{ echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
18584+
echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
18585+
{ echo "$as_me:$LINENO: WARNING: tcl.h: check for missing prerequisite headers?" >&5
18586+
echo "$as_me: WARNING: tcl.h: check for missing prerequisite headers?" >&2;}
18587+
{ echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
18588+
echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;};;
18589+
esac
18590+
echo "$as_me:$LINENO: checking for tcl.h" >&5
18591+
echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
18592+
if test "${ac_cv_header_tcl_h+set}" = set; then
18593+
echo $ECHO_N "(cached) $ECHO_C" >&6
18594+
else
18595+
ac_cv_header_tcl_h=$ac_header_preproc
18596+
fi
18597+
echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
18598+
echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
18599+
18600+
fi
18601+
if test $ac_cv_header_tcl_h = yes; then
18602+
:
18603+
else
18604+
{ { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
18605+
echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
18606+
{ (exit 1); exit 1; }; }
18607+
fi
18608+
18609+
18610+
CPPFLAGS=$ac_save_CPPFLAGS
18611+
fi
1849818612

1849918613
#
1850018614
# Check for DocBook and tools

configure.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.390 2004/12/03 22:24:53 pgsql Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.391 2004/12/16 20:40:59 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1222,6 +1222,11 @@ if test "$with_tcl" = yes; then
12221222
PGAC_EVAL_TCLCONFIGSH([$TCL_CONFIG_SH],
12231223
[TCL_INCLUDE_SPEC,TCL_LIB_FILE,TCL_LIBS,TCL_LIB_SPEC,TCL_SHARED_BUILD])
12241224
AC_SUBST(TCL_SHLIB_LD_LIBS)dnl don't want to double-evaluate that one
1225+
# now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
1226+
ac_save_CPPFLAGS=$CPPFLAGS
1227+
CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
1228+
AC_CHECK_HEADER(tcl.h, [], [AC_MSG_ERROR([header file <tcl.h> is required for Tcl])])
1229+
CPPFLAGS=$ac_save_CPPFLAGS
12251230
fi
12261231

12271232
#

src/pl/tcl/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for the pltcl shared object
44
#
5-
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.43 2004/09/14 03:21:27 tgl Exp $
5+
# $PostgreSQL: pgsql/src/pl/tcl/Makefile,v 1.44 2004/12/16 20:41:01 tgl Exp $
66
#
77
#-------------------------------------------------------------------------
88

@@ -11,7 +11,7 @@ top_builddir = ../../..
1111
include $(top_builddir)/src/Makefile.global
1212

1313

14-
override CPPFLAGS += $(TCL_INCLUDE_SPEC)
14+
override CPPFLAGS := $(TCL_INCLUDE_SPEC) $(CPPFLAGS)
1515

1616

1717
# Find out whether Tcl was built as a shared library --- if not, we

0 commit comments

Comments
 (0)