File: configure.ac

package info (click to toggle)
muparser 2.2.6.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,212 kB
  • sloc: cpp: 6,123; sh: 2,668; ansic: 809; makefile: 330
file content (82 lines) | stat: -rw-r--r-- 2,511 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ======================================================================================
# Author: Francesco Montorsi
# RCS-ID: $Id: configure.ac 634 2012-12-22 10:34:32Z ibg $
# ======================================================================================


# NOTE:
#  the version of the project must be updated also in docs/Doxyfile !
AC_INIT([muparser], [2.2.6], [muparser@beltoforion.de])

AC_PREREQ([2.57])
AC_CONFIG_AUX_DIR([build/autoconf])
AC_LANG(C++)

# some helpers
m4_include(bakefile-presets.m4)



## CONFIGURE CHECKS
#####################################################################

dnl This allows us to use Bakefile, recognizing the system type
dnl (and sets the AC_CANONICAL_BUILD, AC_CANONICAL_HOST and
dnl AC_CANONICAL_TARGET variables)
AC_CANONICAL_SYSTEM

# We want to inhibit AC_PROG_C* macros adding the default "-g -O2" flags.
# To do so, make sure that the variables are not unset - it is ok if they are
# empty. However, their value MUST be retained, since one may have
# called ./configure CFLAGS=-foobar.
CFLAGS="$CFLAGS"
CPPFLAGS="$CPPFLAGS"
CXXFLAGS="$CXXFLAGS"

dnl Checks for basic programs used to compile/install.
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CXXCPP


AC_BAKEFILE_DEBUGOPT([no])
AC_BAKEFILE_SHAREDOPT([yes])

AC_ARG_ENABLE([samples],
            AC_HELP_STRING([--enable-samples], [Builds the library samples, too]),
            [], [enableval="yes"])
AC_BAKEFILE_YESNO_OPTCHECK([SAMPLES], [enableval], [--enable-samples])

dnl Create the output folders in the current build directory
dnl (this handles cases like:
dnl      mkdir mybuild && cd mybuild && ../configure && make  )
AS_MKDIR_P(lib)
AS_MKDIR_P(samples/example1)

AC_BAKEFILE([m4_include(autoconf_inc.m4)])
AC_CONFIG_FILES([Makefile build/autoconf/muparser.pc])
AC_OUTPUT



## CONFIGURE END MESSAGE
#####################################################################

echo
echo " ----------------------------------------------------------------"
echo "  Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed."
echo "  Summary of main configuration settings for $PACKAGE_NAME:"
AC_BAKEFILE_SHOW_SHAREDOPT
AC_BAKEFILE_SHOW_DEBUGOPT
if [[ "$SAMPLES" = "1" ]]; then
    echo "  - SAMPLES enabled"
else
    echo "  - SAMPLES disabled"
fi
echo "  Now, just run make."
echo " ----------------------------------------------------------------"
echo