Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
iberg committed Aug 5, 2013
0 parents commit 02a1658
Show file tree
Hide file tree
Showing 115 changed files with 14,013 additions and 0 deletions.
1,992 changes: 1,992 additions & 0 deletions build/autoconf/aclocal.m4

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions build/autoconf/acregen.sh
@@ -0,0 +1,50 @@
#!/bin/bash
#
# Author: Francesco Montorsi
# RCS-ID: $Id: acregen.sh 236 2009-11-24 23:12:00Z frm $
# Creation date: 14/9/2005
#
# A simple script to generate the configure script
# Some features of this version:
# - automatic test for aclocal version
# - able to be called from any folder
# (i.e. you can call it typing 'build/autoconf/acregen.sh', not only './acregen.sh')


# called when an old version of aclocal is found
function aclocalold()
{
echo "Your aclocal version is $aclocal_maj.$aclocal_min.$aclocal_rel"
echo "Your automake installation is too old; please install automake >= $aclocal_minimal_maj.$aclocal_minimal_min.$aclocal_minimal_rel"
echo "You can download automake from ftp://sources.redhat.com/pub/automake/"
exit 1
}

# first check if we have an ACLOCAL version recent enough
aclocal_verfull=$(aclocal --version)
aclocal_maj=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'`
aclocal_min=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'`
aclocal_rel=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\3/'`
if [[ "$aclocal_rel" = "" ]]; then aclocal_rel="0"; fi

#echo "Your aclocal version is $aclocal_maj.$aclocal_min.$aclocal_rel" # for debugging

aclocal_minimal_maj=1
aclocal_minimal_min=9
aclocal_minimal_rel=6

majok=$(($aclocal_maj > $aclocal_minimal_maj))
minok=$(($aclocal_maj == $aclocal_minimal_maj && $aclocal_min > $aclocal_minimal_min))
relok=$(($aclocal_maj == $aclocal_minimal_maj && $aclocal_min == $aclocal_minimal_min && \
$aclocal_rel >= $aclocal_minimal_rel))

versionok=$(($majok == 1 || $minok == 1 || $relok == 1))
if [[ "$versionok" = "0" ]]; then aclocalold; fi

# we can safely proceed
me=$(basename $0)
path=${0%%/$me} # path from which the script has been launched
current=$(pwd)
cd $path
aclocal && autoconf && mv configure ../..
cd $current
134 changes: 134 additions & 0 deletions build/autoconf/autoconf_inc.m4
@@ -0,0 +1,134 @@
dnl ### begin block 00_header[muparser.bkl] ###
dnl
dnl This macro was generated by
dnl Bakefile 0.2.9 (http://www.bakefile.org)
dnl Do not modify, all changes will be overwritten!

BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.9"

dnl ### begin block 20_COND_DEBUG_0[muparser.bkl] ###
COND_DEBUG_0="#"
if test "x$DEBUG" = "x0" ; then
COND_DEBUG_0=""
fi
AC_SUBST(COND_DEBUG_0)
dnl ### begin block 20_COND_DEBUG_1[muparser.bkl] ###
COND_DEBUG_1="#"
if test "x$DEBUG" = "x1" ; then
COND_DEBUG_1=""
fi
AC_SUBST(COND_DEBUG_1)
dnl ### begin block 20_COND_DEPS_TRACKING_0[muparser.bkl] ###
COND_DEPS_TRACKING_0="#"
if test "x$DEPS_TRACKING" = "x0" ; then
COND_DEPS_TRACKING_0=""
fi
AC_SUBST(COND_DEPS_TRACKING_0)
dnl ### begin block 20_COND_DEPS_TRACKING_1[muparser.bkl] ###
COND_DEPS_TRACKING_1="#"
if test "x$DEPS_TRACKING" = "x1" ; then
COND_DEPS_TRACKING_1=""
fi
AC_SUBST(COND_DEPS_TRACKING_1)
dnl ### begin block 20_COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1[muparser.bkl] ###
COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1="#"
if test "x$PLATFORM_MACOSX" = "x0" -a "x$USE_SOVERCYGWIN" = "x0" -a "x$USE_SOVERSION" = "x1" ; then
COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1=""
fi
AC_SUBST(COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1)
dnl ### begin block 20_COND_PLATFORM_MACOSX_0_USE_SOVERSION_1[muparser.bkl] ###
COND_PLATFORM_MACOSX_0_USE_SOVERSION_1="#"
if test "x$PLATFORM_MACOSX" = "x0" -a "x$USE_SOVERSION" = "x1" ; then
COND_PLATFORM_MACOSX_0_USE_SOVERSION_1=""
fi
AC_SUBST(COND_PLATFORM_MACOSX_0_USE_SOVERSION_1)
dnl ### begin block 20_COND_PLATFORM_MACOSX_1[muparser.bkl] ###
COND_PLATFORM_MACOSX_1="#"
if test "x$PLATFORM_MACOSX" = "x1" ; then
COND_PLATFORM_MACOSX_1=""
fi
AC_SUBST(COND_PLATFORM_MACOSX_1)
dnl ### begin block 20_COND_PLATFORM_MACOSX_1_USE_SOVERSION_1[muparser.bkl] ###
COND_PLATFORM_MACOSX_1_USE_SOVERSION_1="#"
if test "x$PLATFORM_MACOSX" = "x1" -a "x$USE_SOVERSION" = "x1" ; then
COND_PLATFORM_MACOSX_1_USE_SOVERSION_1=""
fi
AC_SUBST(COND_PLATFORM_MACOSX_1_USE_SOVERSION_1)
dnl ### begin block 20_COND_PLATFORM_MAC_0[muparser.bkl] ###
COND_PLATFORM_MAC_0="#"
if test "x$PLATFORM_MAC" = "x0" ; then
COND_PLATFORM_MAC_0=""
fi
AC_SUBST(COND_PLATFORM_MAC_0)
dnl ### begin block 20_COND_PLATFORM_MAC_1[muparser.bkl] ###
COND_PLATFORM_MAC_1="#"
if test "x$PLATFORM_MAC" = "x1" ; then
COND_PLATFORM_MAC_1=""
fi
AC_SUBST(COND_PLATFORM_MAC_1)
dnl ### begin block 20_COND_PLATFORM_OS2_1[muparser.bkl] ###
COND_PLATFORM_OS2_1="#"
if test "x$PLATFORM_OS2" = "x1" ; then
COND_PLATFORM_OS2_1=""
fi
AC_SUBST(COND_PLATFORM_OS2_1)
dnl ### begin block 20_COND_SAMPLES_1[muparser.bkl] ###
COND_SAMPLES_1="#"
if test "x$SAMPLES" = "x1" ; then
COND_SAMPLES_1=""
fi
AC_SUBST(COND_SAMPLES_1)
dnl ### begin block 20_COND_SHARED_0[muparser.bkl] ###
COND_SHARED_0="#"
if test "x$SHARED" = "x0" ; then
COND_SHARED_0=""
fi
AC_SUBST(COND_SHARED_0)
dnl ### begin block 20_COND_SHARED_1[muparser.bkl] ###
COND_SHARED_1="#"
if test "x$SHARED" = "x1" ; then
COND_SHARED_1=""
fi
AC_SUBST(COND_SHARED_1)
dnl ### begin block 20_COND_USE_SOTWOSYMLINKS_1[muparser.bkl] ###
COND_USE_SOTWOSYMLINKS_1="#"
if test "x$USE_SOTWOSYMLINKS" = "x1" ; then
COND_USE_SOTWOSYMLINKS_1=""
fi
AC_SUBST(COND_USE_SOTWOSYMLINKS_1)
dnl ### begin block 20_COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1[muparser.bkl] ###
COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1="#"
if test "x$USE_SOVERCYGWIN" = "x1" -a "x$USE_SOVERSION" = "x1" ; then
COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1=""
fi
AC_SUBST(COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1)
dnl ### begin block 20_COND_USE_SOVERLINUX_1[muparser.bkl] ###
COND_USE_SOVERLINUX_1="#"
if test "x$USE_SOVERLINUX" = "x1" ; then
COND_USE_SOVERLINUX_1=""
fi
AC_SUBST(COND_USE_SOVERLINUX_1)
dnl ### begin block 20_COND_USE_SOVERSION_0[muparser.bkl] ###
COND_USE_SOVERSION_0="#"
if test "x$USE_SOVERSION" = "x0" ; then
COND_USE_SOVERSION_0=""
fi
AC_SUBST(COND_USE_SOVERSION_0)
dnl ### begin block 20_COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1[muparser.bkl] ###
COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1="#"
if test "x$USE_SOVERSION" = "x1" -a "x$USE_SOVERSOLARIS" = "x1" ; then
COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1=""
fi
AC_SUBST(COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1)
dnl ### begin block 20_COND_USE_SOVERSOLARIS_1[muparser.bkl] ###
COND_USE_SOVERSOLARIS_1="#"
if test "x$USE_SOVERSOLARIS" = "x1" ; then
COND_USE_SOVERSOLARIS_1=""
fi
AC_SUBST(COND_USE_SOVERSOLARIS_1)
dnl ### begin block 20_COND_WINDOWS_IMPLIB_1[muparser.bkl] ###
COND_WINDOWS_IMPLIB_1="#"
if test "x$WINDOWS_IMPLIB" = "x1" ; then
COND_WINDOWS_IMPLIB_1=""
fi
AC_SUBST(COND_WINDOWS_IMPLIB_1)
156 changes: 156 additions & 0 deletions build/autoconf/bakefile-presets.m4
@@ -0,0 +1,156 @@
dnl ---------------------------------------------------------------------------
dnl Support macros for makefiles generated with Bakefile presets
dnl ---------------------------------------------------------------------------


dnl ---------------------------------------------------------------------------
dnl AM_YESNO_OPTCHECK([name of the boolean variable to set],
dnl [name of the variable with yes/no values],
dnl [name of the --enable/--with option])
dnl
dnl Converts the $3 variable, supposed to contain a yes/no value to a 1/0
dnl boolean variable and saves the result into $1.
dnl Outputs also the standard checking-option message.
dnl Used by the m4 macros of the presets.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_YESNO_OPTCHECK],
[
AC_MSG_CHECKING([for the $3 option])
if [[ "x$$2" = "xyes" ]]; then
AC_MSG_RESULT([yes])
$1=1
else
AC_MSG_RESULT([no])
$1=0
fi
])

dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_UNICODEOPT([default value for the --enable-unicode option])
dnl
dnl Adds the --enable-unicode option to the configure script and sets the
dnl UNICODE=0/1 variable accordingly to the value of the option.
dnl To be used with unicodeopt.bkl preset.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_UNICODEOPT],
[
default="$1"
if [[ -z "$default" ]]; then
default="no"
fi
AC_ARG_ENABLE([unicode],
AC_HELP_STRING([--enable-unicode], [Builds in Unicode mode]),
[], [enableval="$default"])
AC_BAKEFILE_YESNO_OPTCHECK([UNICODE], [enableval], [--enable-unicode])
])

dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_DEBUGOPT([default value for the --enable-debug option])
dnl
dnl Adds the --enable-debug option to the configure script and sets the
dnl DEBUG=0/1 variable accordingly to the value of the option.
dnl To be used with debugopt.bkl preset.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_DEBUGOPT],
[
default="$1"
if [[ -z "$default" ]]; then
default="no"
fi
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug], [Builds in debug mode]),
[], [enableval="$default"])
AC_BAKEFILE_YESNO_OPTCHECK([DEBUG], [enableval], [--enable-debug])
dnl add the optimize/debug flags
if [[ "x$DEBUG" = "x1" ]]; then
dnl NOTE: the -Wundef and -Wno-ctor-dtor-privacy are not enabled automatically by -Wall
dnl NOTE2: the '-Wno-ctor-dtor-privacy' has sense only when compiling C++ source files
dnl and thus we must be careful to add it only to CXXFLAGS and not to CFLAGS
dnl (remember that CPPFLAGS is reserved for both C and C++ compilers while
dnl CFLAGS is intended as flags for C compiler only and CXXFLAGS for C++ only)
my_CXXFLAGS="$my_CXXFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy"
my_CFLAGS="$my_CFLAGS -g -O0 -Wall -Wundef"
else
my_CXXFLAGS="$my_CXXFLAGS -O2"
my_CFLAGS="$my_CFLAGS -O2"
fi
# User-supplied CXXFLAGS must always take precedence.
# This still sucks because using `make CFLAGS=-foobar` kills
# the project-supplied flags again.
CXXFLAGS="$my_CXXFLAGS $CXXFLAGS"
CFLAGS="$my_CFLAGS $CFLAGS"
])

dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_SHAREDOPT([default value for the --enable-shared option])
dnl
dnl Adds the --enable-shared option to the configure script and sets the
dnl SHARED=0/1 variable accordingly to the value of the option.
dnl To be used with sharedopt.bkl preset.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_SHAREDOPT],
[
default="$1"
if [[ -z "$default" ]]; then
default="no"
fi
AC_ARG_ENABLE([shared],
AC_HELP_STRING([--enable-shared], [Builds in shared mode]),
[], [enableval="$default"])
AC_BAKEFILE_YESNO_OPTCHECK([SHARED], [enableval], [--enable-shared])
])

dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_SHOW_DEBUGOPT
dnl
dnl Prints a message on stdout about the value of the DEBUG variable.
dnl This macro is useful to show summary messages at the end of the configure scripts.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_SHOW_DEBUGOPT],
[
if [[ "$DEBUG" = "1" ]]; then
echo " - DEBUG build"
else
echo " - RELEASE build"
fi
])

dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_SHOW_SHAREDOPT
dnl
dnl Prints a message on stdout about the value of the SHARED variable.
dnl This macro is useful to show summary messages at the end of the configure scripts.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_SHOW_SHAREDOPT],
[
if [[ "$SHARED" = "1" ]]; then
echo " - SHARED mode"
else
echo " - STATIC mode"
fi
])

dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_SHOW_UNICODEOPT
dnl
dnl Prints a message on stdout about the value of the UNICODE variable.
dnl This macro is useful to show summary messages at the end of the configure scripts.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_SHOW_UNICODEOPT],
[
if [[ "$UNICODE" = "1" ]]; then
echo " - UNICODE mode"
else
echo " - ANSI mode"
fi
])


0 comments on commit 02a1658

Please sign in to comment.