dnl dnl Filename : univbinary.m4 dnl Description : Autoconf macro to check for the options for creating universal binaries dnl Author(s) : SBML Team dnl Organization: California Institute of Technology dnl Created : 2008-11-25 dnl Revision : $Id: univbinary.m4 8782 2009-01-09 08:11:56Z mhucka $ dnl $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/config/univbinary.m4 $ dnl dnl */ dnl dnl Supports --enable-universal-binary[=ARG] dnl AC_DEFUN([CONFIG_LIB_UNIVBINARY], [ AC_ARG_VAR([UNIVBINARY]) AC_ARG_ENABLE(universal-binary, AC_HELP_STRING([--enable-universal-binary=ARG], [Generate universal binaries on MacOSX [[default=no]] ("-arch i386 -arch ppc" used when enabled without ARG) ]), [enable_univbinary=$enableval], [enable_univbinary=no]) if test "x$enable_univbinary" != xno; then dnl this option can be used only on MacOSX. case $host in *darwin*) ;; *) AC_MSG_ERROR([*** --enable-universal-binary can be used only on MacOSX. ***]) ;; esac if test "x$enable_univbinary" != xyes; then LDFLAGS="${LDFLAGS} $enable_univbinary" CFLAGS="${CFLAGS} $enable_univbinary" CXXFLAGS="${CXXFLAGS} $enable_univbinary" else default_OPTS="-arch i386 -arch ppc" LDFLAGS="${LDFLAGS} ${default_OPTS}" CFLAGS="${CFLAGS} ${default_OPTS}" CXXFLAGS="${CXXFLAGS} ${default_OPTS}" fi AC_DEFINE([USE_UNIVBINARY], 1, [Define to 1 to add options for creating universal binaries]) AC_SUBST(USE_UNIVBINARY, 1) fi dnl We record the USE_XXX flag, for later testing in Makefiles. LIBSBML_OPTIONS="$LIBSBML_OPTIONS USE_UNIVBINARY" ])