strict-aliasing is gcc 3+ - apply to CFLAGS for libeina.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 13 Mar 2009 10:24:45 +0000 (10:24 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 13 Mar 2009 10:24:45 +0000 (10:24 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@39462 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac
src/lib/Makefile.am

index f3206a1..198bdb2 100644 (file)
@@ -284,6 +284,12 @@ if ! test "${VMIC}" = "x" ; then
    EINA_CFLAGS="${EINA_CFLAGS} -Wall -W -Wextra" # -Werror
 fi
 
+GCC_MAJOR_VERSION=`$CC -dumpversion | sed "s/\..*//"`
+
+if test "$GCC_MAJOR_VERSION" = "3" ; then
+   EINA_CFLAGS="${EINA_CFLAGS} -fno-strict-aliasing"
+fi
+
 AC_SUBST(EINA_CFLAGS)
 
 
index 2f98a6c..b0e95f0 100644 (file)
@@ -5,9 +5,7 @@ AM_CPPFLAGS = \
 -I$(top_builddir)/src/include \
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
--DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-@EINA_CFLAGS@ \
--fno-strict-aliasing
+-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\"
 
 lib_LTLIBRARIES = libeina.la
 
@@ -61,6 +59,7 @@ endif
 
 libeina_la_LIBADD = @EINA_LIBS@ @dlopen_libs@
 libeina_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@
+libeina_la_CFLAGS = @EINA_CFLAGS@
 
 clean-local:
        rm -rf *.gcno