Commit 34fec161 authored by Bruce Momjian's avatar Bruce Momjian

configure cleanup.

parent 4b6fcc44
...@@ -551,37 +551,37 @@ dnl Check for X libraries ...@@ -551,37 +551,37 @@ dnl Check for X libraries
if test "$USE_X" = true; then if test "$USE_X" = true; then
ice_save_LIBS="$LIBS" ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS" ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS" ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS" ice_save_LDFLAGS="$LDFLAGS"
AC_PATH_XTRA AC_PATH_XTRA
LIBS="$LIBS $X_EXTRA_LIBS" LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS" CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS" LDFLAGS="$LDFLAGS $X_LIBS"
dnl Check for X library dnl Check for X library
X11_LIBS="" X11_LIBS=""
AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS}) AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS})
if test "$X11_LIBS" = ""; then if test "$X11_LIBS" = ""; then
dnl Not having X may be fatal. Let the user fix this. dnl Not having X may be fatal. Let the user fix this.
AC_MSG_WARN([The X11 library '-lX11' could not be found. AC_MSG_WARN([The X11 library '-lX11' could not be found.
Please use the configure options '--x-includes=DIR' Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location. and '--x-libraries=DIR' to specify the X location.
See the file 'config.log' for further diagnostics.]) See the file 'config.log' for further diagnostics.])
fi fi
AC_SUBST(X_LIBS) AC_SUBST(X_LIBS)
AC_SUBST(X11_LIBS) AC_SUBST(X11_LIBS)
AC_SUBST(X_PRE_LIBS) AC_SUBST(X_PRE_LIBS)
LIBS="$ice_save_LIBS" LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS" CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS" CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS" LDFLAGS="$ice_save_LDFLAGS"
fi fi
dnl Check for location of Tcl support dnl Check for location of Tcl support
...@@ -590,12 +590,12 @@ dnl Disable Tcl support if not found ...@@ -590,12 +590,12 @@ dnl Disable Tcl support if not found
dnl Check for tcl.h dnl Check for tcl.h
if test "$USE_TCL" = "true" if test "$USE_TCL" = "true"
then then
TCL_INCDIR=no TCL_INCDIR=no
AC_CHECK_HEADER(tcl.h, TCL_INCDIR=yes) AC_CHECK_HEADER(tcl.h, TCL_INCDIR=yes)
if test "$TCL_INCDIR" = "no"; then if test "$TCL_INCDIR" = "no"; then
AC_MSG_WARN(tcl support disabled; tcl.h missing) AC_MSG_WARN(tcl support disabled; tcl.h missing)
USE_TCL= USE_TCL=
fi fi
fi fi
dnl Check for Tcl archive dnl Check for Tcl archive
...@@ -622,39 +622,39 @@ dnl Disable Tcl support if Tk not found ...@@ -622,39 +622,39 @@ dnl Disable Tcl support if Tk not found
dnl Check for tk.h dnl Check for tk.h
if test "$USE_TCL" = "true" if test "$USE_TCL" = "true"
then then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
ice_save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
TK_INCDIR=no TK_INCDIR=no
AC_CHECK_HEADER(tk.h, TK_INCDIR=yes) AC_CHECK_HEADER(tk.h, TK_INCDIR=yes)
if test "$TK_INCDIR" = "no"; then if test "$TK_INCDIR" = "no"; then
AC_MSG_WARN(tcl support disabled; tk.h missing) AC_MSG_WARN(tcl support disabled; tk.h missing)
USE_TCL= USE_TCL=
fi fi
LIBS="$ice_save_LIBS" LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS" CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS" CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS" LDFLAGS="$ice_save_LDFLAGS"
fi fi
dnl Check for Tk archive dnl Check for Tk archive
if test "$USE_TCL" = "true" if test "$USE_TCL" = "true"
then then
ice_save_LIBS="$LIBS" ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS" ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS" ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS" ice_save_LDFLAGS="$LDFLAGS"
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS" LIBS="$LIBS $X_EXTRA_LIBS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS" CFLAGS="$CFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
TK_LIB= LDFLAGS="$LDFLAGS $X_LIBS"
TK_LIB= TK_LIB=
tk_libs="tk8.0 tk80 tk4.2 tk42 tk" tk_libs="tk8.0 tk80 tk4.2 tk42 tk"
for tk_lib in $tk_libs; do for tk_lib in $tk_libs; do
...@@ -668,12 +668,13 @@ TK_LIB= ...@@ -668,12 +668,13 @@ TK_LIB=
else else
TK_LIB=-l$TK_LIB TK_LIB=-l$TK_LIB
fi fi
AC_SUBST(TK_LIB) AC_SUBST(TK_LIB)
fi
LIBS="$ice_save_LIBS" LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS" CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS" CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS" LDFLAGS="$ice_save_LDFLAGS"
fi fi
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile ) AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment