AC_DEFUN(AC_BAKEFILE_SUFFIXES,
[
SO_SUFFIX="so"
+ SO_SUFFIX_MODULE="so"
EXEEXT=""
DLLPREFIX=lib
+ DLLPREFIX_MODULE=
case "${host}" in
*-hp-hpux* )
SO_SUFFIX="sl"
+ SO_SUFFIX_MODULE="sl"
;;
*-*-aix* )
dnl quoting from
dnl .a extension. This will explain why you can't link with an
dnl .so and why it works with the name changed to .a.
SO_SUFFIX="a"
+ SO_SUFFIX_MODULE="a"
;;
*-*-cygwin* | *-*-mingw32* )
SO_SUFFIX="dll"
+ SO_SUFFIX_MODULE="dll"
EXEEXT=".exe"
DLLPREFIX=""
;;
;;
powerpc-*-darwin* )
SO_SUFFIX="dylib"
+ SO_SUFFIX_MODULE="bundle"
;;
esac
AC_SUBST(SO_SUFFIX)
+ AC_SUBST(SO_SUFFIX_MODULE)
AC_SUBST(EXEEXT)
AC_SUBST(DLLPREFIX)
+ AC_SUBST(DLLPREFIX_MODULE)
])
verbose=0
args=""
objects=""
+linking_flag="-dynamiclib"
while test \${#} -gt 0; do
case \${1} in
args="\${args} \${1}"
;;
- -dynamiclib)
- # skip these options
+ -dynamiclib|-bundle)
+ linking_flag="\${1}"
;;
-*)
# Link the shared library from the single module created
#
if test \${verbose} = 1; then
- echo "cc -dynamiclib master.\$\$.o \${args}"
+ echo "cc \${linking_flag} master.\$\$.o \${args}"
fi
-c++ -dynamiclib master.\$\$.o \${args}
+c++ \${linking_flag} master.\$\$.o \${args}
status=\$?
if test \${status} != 0; then
exit \${status}
EOF
chmod +x shared-ld-sh
- SHARED_LD_CC="`pwd`/shared-ld-sh -undefined suppress -flat_namespace -o"
+ SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -undefined suppress -flat_namespace -o"
+ SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -undefined suppress -flat_namespace -o"
SHARED_LD_CXX="$SHARED_LD_CC"
+ SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC"
PIC_FLAG="-dynamic -fPIC"
dnl FIXME - what about C libs? Gilles says to use c++ because it doesn't
dnl matter for C projects and matters for C++ ones
AC_MSG_ERROR(unknown system type $host.)
esac
+ if test "x$SHARED_LD_MODULE_CC" = "x" ; then
+ SHARED_LD_MODULE_CC="$SHARED_LD_CC"
+ fi
+ if test "x$SHARED_LD_MODULE_CXX" = "x" ; then
+ SHARED_LD_MODULE_CC="$SHARED_LD_CXX"
+ fi
+
AC_SUBST(SHARED_LD_CC)
AC_SUBST(SHARED_LD_CXX)
+ AC_SUBST(SHARED_LD_MODULE_CC)
+ AC_SUBST(SHARED_LD_MODULE_CXX)
AC_SUBST(PIC_FLAG)
])
if test "x$GCC" = "xyes"; then
DEPSMODE=gcc
DEPS_TRACKING=1
+ case "${host}" in
+ powerpc-*-darwin* )
+ dnl -cpp-precomp (the default) conflicts with -MMD option
+ dnl used by bk-deps (see also http://developer.apple.com/documentation/Darwin/Conceptual/PortingUnix/compiling/chapter_4_section_3.html)
+ DEPSFLAG_GCC="-no-cpp-precomp -MMD"
+ ;;
+ * )
+ DEPSFLAG_GCC="-MMD"
+ ;;
+ esac
AC_MSG_RESULT([gcc])
else
AC_MSG_RESULT([none])
DEPSMODE=$DEPSMODE
DEPSDIR=.deps
+DEPSFLAG_GCC="$DEPSFLAG_GCC"
mkdir -p \$DEPSDIR
if test \$DEPSMODE = gcc ; then
- \${*} -MMD
+ \${*} \${DEPSFLAG_GCC}
status=\${?}
if test \${status} != 0 ; then
exit \${status}