Search
lxdream.org :: lxdream/configure.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename configure.in
changeset 987:3bd03f1ce0a7
prev985:52e64faac752
next989:7baf5ecd8e98
author nkeynes
date Wed Feb 25 08:50:22 2009 +0000 (10 years ago)
permissions -rw-r--r--
last change Add explicit c99-compliance check for linux/cdrom.h - some kernel versions/arches have
broken headers and need to be compiled with -std=gnu99 rather than -std=c99
file annotate diff log raw
1.1 --- a/configure.in Tue Feb 24 11:47:41 2009 +0000
1.2 +++ b/configure.in Wed Feb 25 08:50:22 2009 +0000
1.3 @@ -97,10 +97,11 @@
1.4 OBJCFLAGS="-g -fexceptions"
1.5 AC_DEFINE(HAVE_EXCEPTIONS, [1], [Have exception stack-frame information])
1.6
1.7 +STDCFLAG="-std=c99"
1.8 AC_CC_VERSION([ CCOPT="-O2 -msse2 -mfpmath=sse"
1.9 - CFLAGS="$CFLAGS -fno-strict-aliasing -std=c99" ],
1.10 + CFLAGS="$CFLAGS -fno-strict-aliasing" ],
1.11 [ CCOPT="$CFLAGS -fast"
1.12 - CFLAGS="$CFLAGS -fno-strict-aliasing -std=c99" ],
1.13 + CFLAGS="$CFLAGS -fno-strict-aliasing" ],
1.14 [ CCOPT="$CFLAGS -O2" ])
1.15
1.16 if test "x$enable_optimized" = "xyes"; then
1.17 @@ -276,7 +277,17 @@
1.18
1.19
1.20 dnl Check for native cdrom support. There can be only one.
1.21 -AC_CHECK_HEADER([linux/cdrom.h], [CDROM_DRIVER=linux], [true])
1.22 +AC_CHECK_HEADER([linux/cdrom.h], [
1.23 + CDROM_DRIVER=linux
1.24 + dnl Some kernel versions have non-c99 compliant headers - check here
1.25 + AC_MSG_CHECKING([C99 compliant kernel headers])
1.26 + old_CFLAGS="$CFLAGS"
1.27 + CFLAGS="$CFLAGS $STDCFLAG"
1.28 + AC_TRY_COMPILE([#include <linux/cdrom.h>], [], [AC_MSG_RESULT([Yes])], [
1.29 + AC_MSG_RESULT([No])
1.30 + STDCFLAG="-std=gnu99"])
1.31 + CFLAGS="$old_CFLAGS"
1.32 +], [true])
1.33 AC_CHECK_HEADER([IOKit/IOKitLib.h], [
1.34 CDROM_DRIVER=osx
1.35 LIBS="$LIBS -framework IOKit"],[true])
1.36 @@ -313,6 +324,7 @@
1.37 AM_CONDITIONAL(BUILD_SYSTEST, [test "$BUILD_SH" = "yes"])
1.38 AM_CONDITIONAL(BUILD_ARMTEST, [test "$BUILD_ARM" = "yes"])
1.39
1.40 +CFLAGS="$CFLAGS $STDCFLAG"
1.41
1.42 dnl ----------------------- All done, finish up -----------------------
1.43 GETTEXT_PACKAGE=lxdream
.