build: No longer run autogen.sh during tarball creation
[bbaumbach/samba-autobuild/.git] / source3 / m4 / check_path.m4
1 dnl
2 dnl Samba3 build environment path checks
3 dnl
4 dnl Copyright (C) Michael Adam 2008
5 dnl
6 dnl Released under the GNU General Public License
7 dnl http://www.gnu.org/licenses/
8 dnl
9
10 AC_LIBREPLACE_LOCATION_CHECKS
11
12 m4_include(../dynconfig/config.m4)
13
14 #################################################
15 # set prefix for 'make test'
16 selftest_prefix="./st"
17 AC_SUBST(selftest_prefix)
18 AC_ARG_WITH(selftest-prefix,
19 [AS_HELP_STRING([--with-selftest-prefix=DIR], [The prefix where make test will be run ($selftest_prefix)])],
20 [ case "$withval" in
21   yes|no)
22     AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
23   ;;
24   * )
25     selftest_prefix="$withval"
26     ;;
27   esac
28 ])
29
30 ## check for --enable-debug first before checking CFLAGS before
31 ## so that we don't mix -O and -g
32 debug=no
33 AC_ARG_ENABLE(debug,
34 [AS_HELP_STRING([--enable-debug], [Turn on compiler debugging information (default=no)])],
35     [if eval "test x$enable_debug = xyes"; then
36         debug=yes
37     fi])
38
39 AC_SUBST(developer)
40 developer=no
41 AC_ARG_ENABLE(developer, [AS_HELP_STRING([--enable-developer], [Turn on developer warnings and debugging (default=no)])],
42     [if eval "test x$enable_developer = xyes"; then
43         debug=yes
44         developer=yes
45         selftest=yes
46     fi])
47
48 AC_SUBST(selftest)
49 selftest=no
50 AC_ARG_ENABLE(selftest, [AS_HELP_STRING([--enable-selftest], [Turn on selftest capability (default=no)])],
51     [if eval "test x$enable_selftest = xyes"; then
52         debug=yes
53         selftest=yes
54     fi])
55
56 krb5developer=no
57 AC_ARG_ENABLE(krb5developer, [AS_HELP_STRING([--enable-krb5developer], [Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)])],
58     [if eval "test x$enable_krb5developer = xyes"; then
59         debug=yes
60         developer=yes
61         krb5_developer=yes
62     fi])
63
64 picky_developer=no
65 AC_ARG_ENABLE(picky-developer, [AS_HELP_STRING([--enable-picky-developer], [Halt compilation on warnings])],
66     [if eval "test x$enable_picky_developer = xyes"; then
67         debug=yes
68         developer=yes
69         picky_developer=yes
70     fi])
71
72 AC_ARG_WITH(cfenc,
73 [AS_HELP_STRING([--with-cfenc=HEADERDIR], [Use internal CoreFoundation encoding API for optimization (Mac OS X/Darwin only)])],
74 [
75 # May be in source $withval/CoreFoundation/StringEncodings.subproj.
76 # Should have been in framework $withval/CoreFoundation.framework/Headers.
77 for d in \
78     $withval/CoreFoundation/StringEncodings.subproj \
79     $withval/StringEncodings.subproj \
80     $withval/CoreFoundation.framework/Headers \
81     $withval/Headers \
82     $withval
83 do
84     if test -r $d/CFStringEncodingConverter.h; then
85         ln -sfh $d include/CoreFoundation
86     fi
87 done
88 ])
89