Search
lxdream.org :: lxdream/configure.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename configure.in
changeset 977:8514fb4bc101
prev966:0f0320cb3650
next984:a01567058a47
author nkeynes
date Mon Feb 02 01:40:13 2009 +0000 (10 years ago)
permissions -rw-r--r--
last change Fix Objective-C checking to be a little more circumspec (to whit, not aborting if no
OBJC compiler is found) - slightly tricky becuase AC_CHECK_HEADER was requiring
preprocessor checks, which ran before we checked if there was in fact an OBJC compiler
in the first place... Fix there was to change the AC_CHECK_HEADER invocation to use the
new (compiler-only) style.
file annotate diff log raw
1.1 --- a/configure.in Thu Jan 15 11:16:48 2009 +0000
1.2 +++ b/configure.in Mon Feb 02 01:40:13 2009 +0000
1.3 @@ -64,7 +64,35 @@
1.4 AC_ARG_WITH( pulse,
1.5 AS_HELP_STRING( [--with-pulse], [Build with support for the PulseAudio audio system]) )
1.6
1.7 -dnl ------------------ Compiler flags -----------------------
1.8 +dnl ------------ Check if we're building on Darwin --------------
1.9 +
1.10 +dnl For starters, do we have a working objective-c compiler?
1.11 +AC_HAVE_OBJC([
1.12 + AC_CHECK_HEADER([Cocoa/Cocoa.h], [
1.13 + HAVE_COCOA='yes'
1.14 + APPLE_BUILD='yes'
1.15 + LIBS="$LIBS -framework AppKit"
1.16 + LIBS="$LIBS -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -framework OpenGL"
1.17 + CPPFLAGS="$CPPFLAGS -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4 -mdynamic-no-pic"
1.18 + LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"
1.19 + AC_DEFINE(HAVE_COCOA,[1],[Have Cocoa framework])
1.20 + AC_DEFINE(APPLE_BUILD,[1],[Building on an apple platform. Things are different...])
1.21 + if test "x$with_gtk" = "xx11"; then
1.22 + with_gtk=no
1.23 + fi
1.24 + ], [], [AC_INCLUDES_DEFAULT])
1.25 +
1.26 + AC_OBJC_VERSION([ OBJCOPT="-O2 -msse2 -mfpmath=sse"
1.27 + OBJCFLAGS="$OBJCFLAGS -fno-strict-aliasing" ],
1.28 + [ OBJCOPT="-O2" ], [] )
1.29 +])
1.30 +
1.31 +AM_CONDITIONAL(GUI_COCOA, [test "$HAVE_COCOA" = 'yes' -a "$with_gtk" = "no"])
1.32 +if test "x$HAVE_COCOA" = 'xyes' -a "x$with_gtk" = "xno"; then
1.33 + AC_DEFINE(OSX_BUNDLE, [1], [Generating a bundled application])
1.34 +fi
1.35 +
1.36 +dnl ------------------ C Compiler flags -----------------------
1.37 CFLAGS="-g -fexceptions"
1.38 OBJCFLAGS="-g -fexceptions"
1.39 AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information])
1.40 @@ -73,9 +101,6 @@
1.41 CFLAGS="$CFLAGS -fno-strict-aliasing" ],
1.42 [ CCOPT="$CFLAGS -fast" ],
1.43 [ CCOPT="$CFLAGS -O2" ])
1.44 -AC_OBJC_VERSION([ OBJCOPT="-O2 -msse2 -mfpmath=sse"
1.45 - OBJCFLAGS="$OBJCFLAGS -fno-strict-aliasing" ],
1.46 - [ OBJCOPT="-O2" ], [] )
1.47
1.48 if test "x$enable_optimized" = "xyes"; then
1.49 CFLAGS="$CFLAGS $CCOPT"
1.50 @@ -109,31 +134,6 @@
1.51 ], [ AC_MSG_WARN([Memory exceptions will be slow]) ])
1.52
1.53
1.54 -dnl ------------ Check if we're building on Darwin --------------
1.55 -
1.56 -dnl For starters, do we have a working objective-c compiler?
1.57 -AC_LANG_OBJC
1.58 -
1.59 -AC_CHECK_HEADER([Cocoa/Cocoa.h], [
1.60 - HAVE_COCOA='yes'
1.61 - APPLE_BUILD='yes'
1.62 - LIBS="$LIBS -framework AppKit"
1.63 - LIBS="$LIBS -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -framework OpenGL"
1.64 - CPPFLAGS="$CPPFLAGS -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4 -mdynamic-no-pic"
1.65 - LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"
1.66 - AC_DEFINE(HAVE_COCOA,[1],[Have Cocoa framework])
1.67 - AC_DEFINE(APPLE_BUILD,[1],[Building on an apple platform. Things are different...])
1.68 - if test "x$with_gtk" = "xx11"; then
1.69 - with_gtk=no
1.70 - fi
1.71 -])
1.72 -
1.73 -AM_CONDITIONAL(GUI_COCOA, [test "$HAVE_COCOA" = 'yes' -a "$with_gtk" = "no"])
1.74 -if test "x$HAVE_COCOA" = 'xyes' -a "x$with_gtk" = "xno"; then
1.75 - AC_DEFINE(OSX_BUNDLE, [1], [Generating a bundled application])
1.76 -fi
1.77 -
1.78 -AC_LANG_C
1.79
1.80 dnl ----------- Check for mandatory dependencies --------------
1.81 dnl Check for libpng (required)
.