dnl
-dnl This file is part of Bakefile (http://bakefile.sourceforge.net)
+dnl This file is part of Bakefile (http://www.bakefile.org)
dnl
dnl Copyright (C) 2003-2007 Vaclav Slavik and others
dnl
PLATFORM_BEOS=1
;;
* )
- dnl wxWidgets-specific: allow unknown Unix systems
+ dnl wxWidgets-specific: allow unknown Unix systems
dnl AC_MSG_ERROR([Unknown platform: $BAKEFILE_FORCE_PLATFORM])
;;
esac
chmod +x shared-ld-sh
SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o"
- SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC"
+ SHARED_LD_MODULE_CXX="CXX=\$(CXX) $SHARED_LD_MODULE_CC"
dnl Most apps benefit from being fully binded (its faster and static
dnl variables initialized at startup work).
SONAME_FLAG=
case "${BAKEFILE_HOST}" in
- *-*-linux* | *-*-freebsd* | *-*-k*bsd*-gnu )
+ *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
+ *-*-k*bsd*-gnu | *-*-mirbsd* )
if test "x$SUNCXX" = "xyes"; then
SONAME_FLAG="-h "
else
AC_CHECK_TOOL(STRIP, strip, :)
AC_CHECK_TOOL(NM, nm, :)
- case ${BAKEFILE_HOST} in
- *-hp-hpux* )
- dnl HP-UX install doesn't handle the "-d" switch so don't
- dnl use it there
- INSTALL_DIR="mkdir -p"
- ;;
- * )
- dnl we must refer to makefile's $(INSTALL) variable and not
- dnl current value of shell variable, hence the single quoting:
- INSTALL_DIR='$(INSTALL) -d'
- ;;
- esac
+ dnl This check is necessary because "install -d" doesn't exist on
+ dnl all platforms (e.g. HP/UX), see http://www.bakefile.org/ticket/80
+ AC_MSG_CHECKING([for command to install directories])
+ INSTALL_TEST_DIR=acbftest$$
+ $INSTALL -d $INSTALL_TEST_DIR > /dev/null 2>&1
+ if test $? = 0 -a -d $INSTALL_TEST_DIR; then
+ rmdir $INSTALL_TEST_DIR
+ dnl we must refer to makefile's $(INSTALL) variable and not
+ dnl current value of shell variable, hence the single quoting:
+ INSTALL_DIR='$(INSTALL) -d'
+ AC_MSG_RESULT([$INSTALL -d])
+ else
+ INSTALL_DIR="mkdir -p"
+ AC_MSG_RESULT([mkdir -p])
+ fi
AC_SUBST(INSTALL_DIR)
LDFLAGS_GUI=
[
AC_PREREQ([2.58])
+ dnl We need to always run C/C++ compiler tests, but it's also possible
+ dnl for the user to call these macros manually, hence this instead of
+ dnl simply calling these macros. See http://www.bakefile.org/ticket/64
+ AC_REQUIRE([AC_BAKEFILE_PROG_CC])
+ AC_REQUIRE([AC_BAKEFILE_PROG_CXX])
+
if test "x$BAKEFILE_HOST" = "x"; then
if test "x${host}" = "x" ; then
AC_MSG_ERROR([You must call the autoconf "CANONICAL_HOST" macro in your configure.ac (or .in) file.])
AC_BAKEFILE_DEPS
AC_BAKEFILE_RES_COMPILERS
- BAKEFILE_BAKEFILE_M4_VERSION="0.2.2"
+ BAKEFILE_BAKEFILE_M4_VERSION="0.2.3"
dnl includes autoconf_inc.m4:
$1
cat <<EOF >bk-deps
#!/bin/sh
-# This script is part of Bakefile (http://bakefile.sourceforge.net) autoconf
+# This script is part of Bakefile (http://www.bakefile.org) autoconf
# script. It is used to track C/C++ files dependencies in portable way.
#
# Permission is given to use this file in any way.
if test ${D}DEPSMODE = gcc ; then
${D}* ${D}{DEPSFLAG}
status=${D}?
- if test ${D}{status} != 0 ; then
- exit ${D}{status}
- fi
- # move created file to the location we want it in:
+
+ # determine location of created files:
while test ${D}# -gt 0; do
case "${D}1" in
-o )
done
depfile=\`basename ${D}srcfile | sed -e 's/\\..*${D}/.d/g'\`
depobjname=\`echo ${D}depfile |sed -e 's/\\.d/.o/g'\`
+
+ # if the compiler failed, we're done:
+ if test ${D}{status} != 0 ; then
+ rm -f ${D}depfile
+ exit ${D}{status}
+ fi
+
+ # move created file to the location we want it in:
if test -f ${D}depfile ; then
sed -e "s,${D}depobjname:,${D}objfile:,g" ${D}depfile >${D}{DEPSDIR}/${D}{objfile}.d
rm -f ${D}depfile
linking_flag="-dynamiclib"
ldargs="-r -keep_private_externs -nostdlib"
+if test "x${D}CXX" = "x"; then
+ CXX="c++"
+fi
+
while test ${D}# -gt 0; do
case ${D}1 in
args="${D}{args} ${D}1 ${D}2"
shift
;;
+
+ -arch|-isysroot)
+ # collect these options and values
+ ldargs="${D}{ldargs} ${D}1 ${D}2"
+ shift
+ ;;
-s|-Wl,*)
# collect these load args
# Link one module containing all the others
#
if test ${D}{verbose} = 1; then
- echo "c++ ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o"
+ echo "${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o"
fi
-c++ ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o
+${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o
status=${D}?
#
#
if test ${D}{status} = 0; then
if test ${D}{verbose} = 1; then
- echo "c++ ${D}{linking_flag} master.${D}${D}.o ${D}{args}"
+ echo "${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}"
fi
- c++ ${D}{linking_flag} master.${D}${D}.o ${D}{args}
+ ${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}
status=${D}?
fi
cat <<EOF >bk-make-pch
#!/bin/sh
-# This script is part of Bakefile (http://bakefile.sourceforge.net) autoconf
+# This script is part of Bakefile (http://www.bakefile.org) autoconf
# script. It is used to generated precompiled headers.
#
# Permission is given to use this file in any way.
#! /bin/sh
-# From configure.in Id: configure.in 51259 2008-01-17 05:17:24Z PC .
+# From configure.in Id: configure.in 51537 2008-02-04 00:16:33Z VZ .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
#
+
+
+
if test "x$BAKEFILE_HOST" = "x"; then
if test "x${host}" = "x" ; then
{ { echo "$as_me:$LINENO: error: You must call the autoconf \"CANONICAL_HOST\" macro in your configure.ac (or .in) file." >&5
fi
- case ${BAKEFILE_HOST} in
- *-hp-hpux* )
- INSTALL_DIR="mkdir -p"
- ;;
- * )
- INSTALL_DIR='$(INSTALL) -d'
- ;;
- esac
+ { echo "$as_me:$LINENO: checking for command to install directories" >&5
+echo $ECHO_N "checking for command to install directories... $ECHO_C" >&6; }
+ INSTALL_TEST_DIR=acbftest$$
+ $INSTALL -d $INSTALL_TEST_DIR > /dev/null 2>&1
+ if test $? = 0 -a -d $INSTALL_TEST_DIR; then
+ rmdir $INSTALL_TEST_DIR
+ INSTALL_DIR='$(INSTALL) -d'
+ { echo "$as_me:$LINENO: result: $INSTALL -d" >&5
+echo "${ECHO_T}$INSTALL -d" >&6; }
+ else
+ INSTALL_DIR="mkdir -p"
+ { echo "$as_me:$LINENO: result: mkdir -p" >&5
+echo "${ECHO_T}mkdir -p" >&6; }
+ fi
LDFLAGS_GUI=
PLATFORM_BEOS=1
;;
* )
- ;;
+ ;;
esac
fi
linking_flag="-dynamiclib"
ldargs="-r -keep_private_externs -nostdlib"
+if test "x${D}CXX" = "x"; then
+ CXX="c++"
+fi
+
while test ${D}# -gt 0; do
case ${D}1 in
shift
;;
+ -arch|-isysroot)
+ # collect these options and values
+ ldargs="${D}{ldargs} ${D}1 ${D}2"
+ shift
+ ;;
+
-s|-Wl,*)
# collect these load args
ldargs="${D}{ldargs} ${D}1"
# Link one module containing all the others
#
if test ${D}{verbose} = 1; then
- echo "c++ ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o"
+ echo "${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o"
fi
-c++ ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o
+${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o
status=${D}?
#
#
if test ${D}{status} = 0; then
if test ${D}{verbose} = 1; then
- echo "c++ ${D}{linking_flag} master.${D}${D}.o ${D}{args}"
+ echo "${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}"
fi
- c++ ${D}{linking_flag} master.${D}${D}.o ${D}{args}
+ ${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}
status=${D}?
fi
chmod +x shared-ld-sh
SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o"
- SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC"
+ SHARED_LD_MODULE_CXX="CXX=\$(CXX) $SHARED_LD_MODULE_CC"
{ echo "$as_me:$LINENO: checking for gcc 3.1 or later" >&5
SONAME_FLAG=
case "${BAKEFILE_HOST}" in
- *-*-linux* | *-*-freebsd* | *-*-k*bsd*-gnu )
+ *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
+ *-*-k*bsd*-gnu | *-*-mirbsd* )
if test "x$SUNCXX" = "xyes"; then
SONAME_FLAG="-h "
else
cat <<EOF >bk-deps
#!/bin/sh
-# This script is part of Bakefile (http://bakefile.sourceforge.net) autoconf
+# This script is part of Bakefile (http://www.bakefile.org) autoconf
# script. It is used to track C/C++ files dependencies in portable way.
#
# Permission is given to use this file in any way.
if test ${D}DEPSMODE = gcc ; then
${D}* ${D}{DEPSFLAG}
status=${D}?
- if test ${D}{status} != 0 ; then
- exit ${D}{status}
- fi
- # move created file to the location we want it in:
+
+ # determine location of created files:
while test ${D}# -gt 0; do
case "${D}1" in
-o )
done
depfile=\`basename ${D}srcfile | sed -e 's/\\..*${D}/.d/g'\`
depobjname=\`echo ${D}depfile |sed -e 's/\\.d/.o/g'\`
+
+ # if the compiler failed, we're done:
+ if test ${D}{status} != 0 ; then
+ rm -f ${D}depfile
+ exit ${D}{status}
+ fi
+
+ # move created file to the location we want it in:
if test -f ${D}depfile ; then
sed -e "s,${D}depobjname:,${D}objfile:,g" ${D}depfile >${D}{DEPSDIR}/${D}{objfile}.d
rm -f ${D}depfile
- BAKEFILE_BAKEFILE_M4_VERSION="0.2.2"
+ BAKEFILE_BAKEFILE_M4_VERSION="0.2.3"
BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.3"
cat <<EOF >bk-make-pch
#!/bin/sh
-# This script is part of Bakefile (http://bakefile.sourceforge.net) autoconf
+# This script is part of Bakefile (http://www.bakefile.org) autoconf
# script. It is used to generated precompiled headers.
#
# Permission is given to use this file in any way.