Search
lxdream.org :: lxdream/configure.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename configure.in
changeset 964:f2f3c7612d06
prev927:17b6b9e245d8
next966:0f0320cb3650
author nkeynes
date Thu Jan 15 04:15:11 2009 +0000 (10 years ago)
permissions -rw-r--r--
last change Add support for the Intel ICC compiler (C only, icc doesn't support Obj-C)
- Rename Obj-C source to .m
- Separate paths.c into paths_unix.c and paths_osx.m
- Add configuration detection of ICC, along with specific opt flags
file annotate diff log raw
1.1 --- a/configure.in Mon Dec 15 10:44:56 2008 +0000
1.2 +++ b/configure.in Thu Jan 15 04:15:11 2009 +0000
1.3 @@ -8,12 +8,16 @@
1.4 AC_ISC_POSIX
1.5 AC_PROG_CC
1.6 AM_PROG_CC_STDC
1.7 +AC_PROG_OBJC
1.8 +AC_PROG_SED
1.9 AM_PROG_AS
1.10 AC_CHECK_SIZEOF([void *])
1.11 AC_HEADER_STDC
1.12 AC_CANONICAL_BUILD
1.13 AC_CANONICAL_HOST
1.14
1.15 +_AM_DEPENDENCIES([OBJC])
1.16 +
1.17 AC_PATH_PROG(POD2MAN, [pod2man])
1.18 AC_PATH_PROG(POD2HTML, [pod2html])
1.19
1.20 @@ -58,26 +62,35 @@
1.21 AC_ARG_WITH( pulse,
1.22 AS_HELP_STRING( [--with-pulse], [Build with support for the PulseAudio audio system]) )
1.23
1.24 -dnl ------------
1.25 +dnl ------------------ Compiler flags -----------------------
1.26 +CFLAGS="-g -fexceptions"
1.27 +OBJCFLAGS="-g -fexceptions"
1.28 +AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information])
1.29 +
1.30 +AC_CC_VERSION([ CCOPT="-O2 -msse2 -mfpmath=sse"
1.31 + CFLAGS="$CFLAGS -fno-strict-aliasing" ],
1.32 + [ CCOPT="$CFLAGS -fast" ],
1.33 + [ CCOPT="$CFLAGS -O2" ])
1.34 +AC_OBJC_VERSION([ OBJCOPT="-O2 -msse2 -mfpmath=sse"
1.35 + OBJCFLAGS="$OBJCFLAGS -fno-strict-aliasing" ],
1.36 + [ OBJCOPT="-O2" ], [] )
1.37
1.38 if test "x$enable_optimized" = "xyes"; then
1.39 - CFLAGS="-g -O2 -msse2 -mfpmath=sse"
1.40 + CFLAGS="$CFLAGS $CCOPT"
1.41 + OBJCFLAGS="$OBJCFLAGS $CCOPT"
1.42 if test "x$enable_profiled" != "xyes"; then
1.43 dnl -fomit-frame-pointer can't be used with -pg
1.44 - CFLAGS="$CFLAGS -fexceptions -fomit-frame-pointer"
1.45 - AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information])
1.46 + CFLAGS="$CFLAGS -fomit-frame-pointer"
1.47 fi
1.48 -else
1.49 - CFLAGS="-g3"
1.50 +else
1.51 + CFLAGS="$CFLAGS -g3"
1.52 + OBJCFLAGS="$OBJCFLAGS -g3"
1.53 fi
1.54
1.55 if test "x$enable_profiled" = "xyes"; then
1.56 CFLAGS="$CFLAGS -pg"
1.57 LDFLAGS="$LDFLAGS -pg";
1.58 -fi
1.59 -
1.60 -if test "x$GCC" = "xyes"; then
1.61 - CFLAGS="$CFLAGS -fno-strict-aliasing"
1.62 + OBJCFLAGS="$OBJCFLAGS -pg";
1.63 fi
1.64
1.65 AC_CHECK_FASTCALL([
1.66 @@ -91,11 +104,9 @@
1.67 dnl ------------ Check if we're building on Darwin --------------
1.68
1.69 dnl For starters, do we have a working objective-c compiler?
1.70 -lxdream_save_cppflags="$CPPFLAGS"
1.71 -CPPFLAGS="$CPPFLAGS -x objective-c"
1.72 -AC_TRY_COMPILE([@interface Foo @end],, [
1.73 +AC_LANG_OBJC
1.74
1.75 - AC_CHECK_HEADER([Cocoa/Cocoa.h], [
1.76 +AC_CHECK_HEADER([Cocoa/Cocoa.h], [
1.77 HAVE_COCOA='yes'
1.78 APPLE_BUILD='yes'
1.79 LIBS="$LIBS -framework AppKit"
1.80 @@ -107,14 +118,15 @@
1.81 if test "x$with_gtk" = "xx11"; then
1.82 with_gtk=no
1.83 fi
1.84 - ])
1.85 +])
1.86
1.87 -], [CPPFLAGS="$lxdream_save_cppflags"] )
1.88 AM_CONDITIONAL(GUI_COCOA, [test "$HAVE_COCOA" = 'yes' -a "$with_gtk" = "no"])
1.89 if test "x$HAVE_COCOA" = 'xyes' -a "x$with_gtk" = "xno"; then
1.90 AC_DEFINE(OSX_BUNDLE, [1], [Generating a bundled application])
1.91 fi
1.92
1.93 +AC_LANG_C
1.94 +
1.95 dnl ----------- Check for mandatory dependencies --------------
1.96 dnl Check for libpng (required)
1.97 PKG_CHECK_MODULES(LIBPNG, [libpng] )
.