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

configure cleanup.

parent 4b6fcc44
......@@ -551,37 +551,37 @@ dnl Check for X libraries
if test "$USE_X" = true; then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
AC_PATH_XTRA
AC_PATH_XTRA
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
dnl Check for X library
dnl Check for X library
X11_LIBS=""
AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS})
if test "$X11_LIBS" = ""; then
dnl Not having X may be fatal. Let the user fix this.
AC_MSG_WARN([The X11 library '-lX11' could not be found.
X11_LIBS=""
AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS})
if test "$X11_LIBS" = ""; then
dnl Not having X may be fatal. Let the user fix this.
AC_MSG_WARN([The X11 library '-lX11' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.
See the file 'config.log' for further diagnostics.])
fi
AC_SUBST(X_LIBS)
AC_SUBST(X11_LIBS)
AC_SUBST(X_PRE_LIBS)
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
fi
AC_SUBST(X_LIBS)
AC_SUBST(X11_LIBS)
AC_SUBST(X_PRE_LIBS)
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
fi
dnl Check for location of Tcl support
......@@ -590,12 +590,12 @@ dnl Disable Tcl support if not found
dnl Check for tcl.h
if test "$USE_TCL" = "true"
then
TCL_INCDIR=no
AC_CHECK_HEADER(tcl.h, TCL_INCDIR=yes)
if test "$TCL_INCDIR" = "no"; then
AC_MSG_WARN(tcl support disabled; tcl.h missing)
USE_TCL=
fi
TCL_INCDIR=no
AC_CHECK_HEADER(tcl.h, TCL_INCDIR=yes)
if test "$TCL_INCDIR" = "no"; then
AC_MSG_WARN(tcl support disabled; tcl.h missing)
USE_TCL=
fi
fi
dnl Check for Tcl archive
......@@ -622,39 +622,39 @@ dnl Disable Tcl support if Tk not found
dnl Check for tk.h
if test "$USE_TCL" = "true"
then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
TK_INCDIR=no
AC_CHECK_HEADER(tk.h, TK_INCDIR=yes)
if test "$TK_INCDIR" = "no"; then
AC_MSG_WARN(tcl support disabled; tk.h missing)
USE_TCL=
fi
TK_INCDIR=no
AC_CHECK_HEADER(tk.h, TK_INCDIR=yes)
if test "$TK_INCDIR" = "no"; then
AC_MSG_WARN(tcl support disabled; tk.h missing)
USE_TCL=
fi
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
fi
dnl Check for Tk archive
if test "$USE_TCL" = "true"
then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
TK_LIB=
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
TK_LIB=
tk_libs="tk8.0 tk80 tk4.2 tk42 tk"
for tk_lib in $tk_libs; do
......@@ -668,12 +668,13 @@ TK_LIB=
else
TK_LIB=-l$TK_LIB
fi
AC_SUBST(TK_LIB)
fi
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
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 )
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