summaryrefslogtreecommitdiffstats
path: root/unix/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'unix/configure.ac')
-rw-r--r--unix/configure.ac116
1 files changed, 62 insertions, 54 deletions
diff --git a/unix/configure.ac b/unix/configure.ac
index 3bacf8b..0e30571 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -26,7 +26,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
TK_VERSION=9.0
TK_MAJOR_VERSION=9
TK_MINOR_VERSION=0
-TK_PATCH_LEVEL="b3"
+TK_PATCH_LEVEL=".1"
VERSION=${TK_VERSION}
LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv"
@@ -141,8 +141,8 @@ fi
if test "$TCL_PREFIX" != "$prefix"; then
AC_MSG_WARN([
- Different --prefix selected for Tk and Tcl!
- [[package require tk]] may not work correctly in tclsh.])
+ Different --prefix selected for Tk and Tcl!
+ [[package require tk]] may not work correctly in tclsh.])
fi
#--------------------------------------------------------------------
@@ -236,44 +236,6 @@ if test "`uname -s`" = "Darwin" ; then
LDFLAGS=$hold_ldflags])
fi
AC_CHECK_HEADERS(AvailabilityMacros.h)
- if test "$ac_cv_header_AvailabilityMacros_h" = yes; then
- AC_CACHE_CHECK([if weak import is available], tcl_cv_cc_weak_import, [
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
- #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
- #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
- #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020
- #endif
- #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1020
- #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020
- #endif
- int rand(void) __attribute__((weak_import));
- ]], [[rand();]])],
- [tcl_cv_cc_weak_import=yes],[tcl_cv_cc_weak_import=no])
- CFLAGS=$hold_cflags])
- if test $tcl_cv_cc_weak_import = yes; then
- AC_DEFINE(HAVE_WEAK_IMPORT, 1, [Is weak import available?])
- fi
- AC_CACHE_CHECK([if Darwin SUSv3 extensions are available],
- tcl_cv_cc_darwin_c_source, [
- hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
- #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
- #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050
- #endif
- #elif MAC_OS_X_VERSION_MIN_REQUIRED < 1050
- #error MAC_OS_X_VERSION_MIN_REQUIRED < 1050
- #endif
- #define _DARWIN_C_SOURCE 1
- #include <sys/cdefs.h>
- ]], [[]])],[tcl_cv_cc_darwin_c_source=yes],[tcl_cv_cc_darwin_c_source=no])
- CFLAGS=$hold_cflags])
- if test $tcl_cv_cc_darwin_c_source = yes; then
- AC_DEFINE(_DARWIN_C_SOURCE, 1,
- [Are Darwin SUSv3 extensions available?])
- fi
- fi
else
tk_aqua=no
fi
@@ -282,15 +244,15 @@ if test $tk_aqua = yes; then
AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?])
LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore -framework Security -framework CoreGraphics"
if test -d /System/Library/Frameworks/UserNotifications.framework; then
- LIBS="$LIBS -framework UserNotifications"
+ LIBS="$LIBS -framework UserNotifications"
fi
if test -d "/System/Library/Frameworks/UniformTypeIdentifiers.framework"; then
- LIBS="$LIBS -weak_framework UniformTypeIdentifiers"
+ LIBS="$LIBS -weak_framework UniformTypeIdentifiers"
fi
EXTRA_CC_SWITCHES='-x objective-c'
TK_WINDOWINGSYSTEM=AQUA
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
- AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?])
+ AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?])
fi
else
#--------------------------------------------------------------------
@@ -452,7 +414,7 @@ if test $tk_aqua = no; then
XFT_CFLAGS=""
XFT_LIBS=""
else
- enable_xft=yes
+ enable_xft=yes
fi
fi
if test $enable_xft = "yes" ; then
@@ -467,6 +429,52 @@ if test $tk_aqua = no; then
fi
#--------------------------------------------------------------------
+# Check for libcups support
+#--------------------------------------------------------------------
+
+if test $tk_aqua = no; then
+ AC_MSG_CHECKING([whether to use libcups])
+ AC_ARG_ENABLE(libcups,
+ AS_HELP_STRING([--enable-libcups],
+ [use libcups (default: on)]),
+ [enable_libcups=$enableval], [enable_libcups="default"])
+ CUPS_CFLAGS=""
+ CUPS_LIBS=""
+ if test "$enable_libcups" = "no" ; then
+ AC_MSG_RESULT([$enable_libcups])
+ else
+ found_cups=`cups-config 2>/dev/null`
+ dnl make sure package configurator (cups-config)
+ dnl says that libcups is present.
+ if test "$found_cups" = ""; then
+ found_cups=no
+ else
+ found_cups=yes
+ CUPS_CFLAGS="-DHAVE_CUPS"
+ CUPS_LIBS=`cups-config --libs`
+ fi
+ AC_MSG_RESULT([$found_cups])
+ dnl make sure that compiling against CUPS header file doesn't bomb
+ if test "$found_cups" = "yes" ; then
+ tk_oldCFlags=$CFLAGS
+ CFLAGS="$CFLAGS $XINCLUDES $CUPS_CFLAGS"
+ tk_oldLibs=$LIBS
+ LIBS="$tk_oldLIBS $CUPS_LIBS $XLIBSW"
+ AC_CHECK_HEADER(cups/cups.h, [], [
+ found_cups=no
+ CUPS_CFLAGS=""
+ CUPS_LIBS=""
+ ],[#include <cups/cups.h>])
+ CFLAGS=$tk_oldCFlags
+ LIBS=$tk_oldLibs
+ fi
+ fi
+ AC_SUBST(CUPS_CFLAGS)
+ AC_SUBST(CUPS_LIBS)
+fi
+
+
+#--------------------------------------------------------------------
# XXX Do this last.
# It might modify XLIBSW which could affect other tests.
#
@@ -584,17 +592,17 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
# Construct a fake local framework structure to make linking with
# '-framework Tk' and running of tktest work
AC_CONFIG_COMMANDS([Tk.framework], [n=Tk &&
- f=$n.framework && v=Versions/$VERSION &&
- rm -rf $f && mkdir -p $f/$v/Resources &&
- ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
- ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
- if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi &&
- unset n f v
+ f=$n.framework && v=Versions/$VERSION &&
+ rm -rf $f && mkdir -p $f/$v/Resources &&
+ ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
+ ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
+ if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi &&
+ unset n f v
], VERSION=${TK_VERSION} && tk_aqua=${tk_aqua})
LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
if test "${libdir}" = '${exec_prefix}/lib'; then
- # override libdir default
- libdir="/Library/Frameworks"
+ # override libdir default
+ libdir="/Library/Frameworks"
fi
if test ${TCL_MAJOR_VERSION} = 8 ; then
TK_LIB_FILE="Tk"
@@ -637,7 +645,7 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
EXTRA_CC_SWITCHES="$EXTRA_CC_SWITCHES"' -DTK_FRAMEWORK_VERSION=\"$(VERSION)\"'
else
if test $tk_aqua = yes; then
- EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done'
+ EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done'
fi
# libdir must be a fully qualified path and not ${exec_prefix}/lib
eval libdir="$libdir"