forked from AuroraMiddleware/gtk
Fix --enable-{cups,papi} handling
The configure script was not doing the right thing when these options where explicitly given. Reported by Marvin Schmidt in bug 593012.
This commit is contained in:
parent
7e4e2c636e
commit
a8715045ce
35
configure.in
35
configure.in
@ -1841,10 +1841,19 @@ AC_ARG_ENABLE(cups,
|
||||
[disable cups print backend])],,
|
||||
[enable_cups=auto])
|
||||
|
||||
if test "x$enable_cups" = "xauto"
|
||||
then
|
||||
if test "x$enable_cups" = "xno"; then
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
else
|
||||
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
|
||||
if test "x$CUPS_CONFIG" != "xno"; then
|
||||
if test "x$CUPS_CONFIG" = "xno"; then
|
||||
if test "x$enable_cups" = "xauto"; then
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** cups not found.
|
||||
])
|
||||
fi
|
||||
else
|
||||
CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
|
||||
CUPS_LIBS=`$CUPS_CONFIG --libs`
|
||||
|
||||
@ -1865,7 +1874,8 @@ then
|
||||
|
||||
AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
|
||||
|
||||
AM_CONDITIONAL(HAVE_CUPS, true)
|
||||
|
||||
gtk_save_cflags="$CFLAGS"
|
||||
CFLAGS="$CUPS_CFLAGS"
|
||||
@ -1881,9 +1891,6 @@ then
|
||||
LIBS="$CUPS_LIBS"
|
||||
AC_CHECK_FUNCS(httpGetAuthString)
|
||||
LIBS="$gtk_save_libs"
|
||||
|
||||
else
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
fi
|
||||
|
||||
# Checks to see if we should compile with PAPI backend for GTK+
|
||||
@ -1894,19 +1901,23 @@ AC_ARG_ENABLE(papi,
|
||||
[disable papi print backend])],,
|
||||
[enable_papi=auto])
|
||||
|
||||
if test "x$enable_papi" = "xauto"
|
||||
then
|
||||
if test "x$enable_papi" = "xno"; then
|
||||
AM_CONDITIONAL(HAVE_PAPI, false)
|
||||
else
|
||||
AC_MSG_CHECKING(libpapi)
|
||||
AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
|
||||
if test $have_papi = yes; then
|
||||
AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
|
||||
else
|
||||
AM_CONDITIONAL(HAVE_PAPI, false)
|
||||
if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
|
||||
AC_MSG_ERROR([
|
||||
*** papi not found.
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_PAPI_CUPS, test $have_papi = yes && test "x$CUPS_CONFIG" != "xno")
|
||||
AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
|
||||
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
|
||||
|
Loading…
Reference in New Issue
Block a user