This patch tweaks the CFLAGS that are set when compiling on OS X. This is needed so that --with-perl will build correctly. By default, configure detects that it is able to build with perl support, but the build will fail because perl.o was compiled with more architectures than the other epic objects.

I have only tested this on my machine running Snow Leopard. If anyone has Leopard or Tiger machines and can test this patch it'd be very helpful. If you do test this and it doesn't work, please send me the output of "gcc --version".

-Zach

Index: configure.in
===================================================================
RCS file: /home/cvs/repository/epic5/configure.in,v
retrieving revision 1.90
diff -u -r1.90 configure.in
--- configure.in        15 Feb 2010 03:59:10 -0000      1.90
+++ configure.in        21 Mar 2010 19:11:56 -0000
@@ -90,6 +90,33 @@
 dnl fi
 AC_CHECK_LIB([cext], [setenv], [LIBS="$LIBS -lcext"],)

+dnl
+dnl Checking for Macintosh OS X
+dnl
+AC_MSG_CHECKING([for Macintosh OS X])
+( $CC --version 2>&1 | grep 'apple-darwin' > /dev/null ) && \
+       apple_compiler="yes" \
+       CFLAGS="$CFLAGS -arch ppc -arch i386 -arch x86_64"
+dnl
+dnl The above option was only tested on Mac OS X 10.6 (Snow Leopard.) It's +dnl possible that the CFLAGS will need to be tweaked for earlier versions. +dnl The block below should handle that, but I don't have a 10.4 or a 10.5
+dnl machine to test against.
+dnl
+dnl dnl 10.6 (Snow Leopard)
+dnl ( $CC --version 2>&1 | grep 'apple-darwin10' > /dev/null ) && \
+dnl    apple_compiler="yes" \
+dnl    CFLAGS="$CFLAGS -arch ppc -arch i386 -arch x86_64"
+dnl dnl 10.5 (Leopard)
+dnl ( $CC --version 2>&1 | grep 'apple-darwin9' > /dev/null ) && \
+dnl    apple_compiler="yes" \
+dnl    CFLAGS="$CFLAGS -arch ppc -arch i386 -arch x86_64"
+dnl dnl 10.4 (Tiger)
+dnl ( $CC --version 2>&1 | grep 'apple-darwin8' > /dev/null ) && \
+dnl    apple_compiler="yes" \
+dnl    CFLAGS="$CFLAGS -arch ppc -arch i386 -arch x86_64"
+AC_MSG_RESULT([ok])
+

 dnl ----------------------------------------------------------
 AC_MSG_CHECKING(if you want threaded stdout)

_______________________________________________
List mailing list
List@epicsol.org
http://epicsol.org/mailman/listinfo/list

Reply via email to