2 dnl Samba3 build environment path checks
4 dnl Copyright (C) Michael Adam 2008
6 dnl Released under the GNU General Public License
7 dnl http://www.gnu.org/licenses/
10 AC_LIBREPLACE_LOCATION_CHECKS
12 m4_include(../dynconfig/config.m4)
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)])],
22 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default])
25 selftest_prefix="$withval"
30 #################################################
31 # set shrdir for 'make test'
33 AC_SUBST(selftest_shrdir)
34 AC_ARG_WITH(selftest-shrdir,
35 [AS_HELP_STRING([--with-selftest-shrdir=DIR], [The share directory that make test will be run against ($selftest_shrdir)])],
38 AC_MSG_WARN([--with-selftest-shrdir called without argument - will use default])
41 selftest_shrdir="-s $withval"
46 #################################################
47 # set path of samba4's smbtorture
49 AC_SUBST(smbtorture4_path)
51 AC_SUBST(smbtorture4_option)
52 AC_ARG_WITH(smbtorture4_path,
53 [AS_HELP_STRING([--with-smbtorture4-path=PATH], [The path to a samba4 smbtorture for make test (none)])],
56 AC_MSG_ERROR([--with-smbtorture4-path should take a path])
59 smbtorture4_path="$withval"
60 if test -z "$smbtorture4_path" -a ! -f $smbtorture4_path; then
61 AC_MSG_ERROR(['$smbtorture_path' does not exist!])
63 smbtorture4_option="-t $withval"
68 #################################################
69 # set custom conf for make test
70 selftest_custom_conf=""
71 AC_SUBST(selftest_custom_conf)
72 AC_ARG_WITH(selftest_custom_conf,
73 [AS_HELP_STRING([--with-selftest-custom-conf=PATH], [An optional custom smb.conf that is included in the server smb.conf during make test(none)])],
76 AC_MSG_ERROR([--with-selftest-custom-conf should take a path])
79 selftest_custom_conf="$withval"
80 if test -z "$selftest_custom_conf" -a ! -f $selftest_custom_conf; then
81 AC_MSG_ERROR(['$selftest_custom_conf' does not exist!])
83 selftest_custom_conf="-c $withval"
88 ## check for --enable-debug first before checking CFLAGS before
89 ## so that we don't mix -O and -g
92 [AS_HELP_STRING([--enable-debug], [Turn on compiler debugging information (default=no)])],
93 [if eval "test x$enable_debug = xyes"; then
99 AC_ARG_ENABLE(developer, [AS_HELP_STRING([--enable-developer], [Turn on developer warnings and debugging (default=no)])],
100 [if eval "test x$enable_developer = xyes"; then
106 AC_ARG_ENABLE(krb5developer, [AS_HELP_STRING([--enable-krb5developer], [Turn on developer warnings and debugging, except -Wstrict-prototypes (default=no)])],
107 [if eval "test x$enable_krb5developer = xyes"; then
114 AC_ARG_ENABLE(picky-developer, [AS_HELP_STRING([--enable-picky-developer], [Halt compilation on warnings])],
115 [if eval "test x$enable_picky_developer = xyes"; then
122 [AS_HELP_STRING([--with-cfenc=HEADERDIR], [Use internal CoreFoundation encoding API for optimization (Mac OS X/Darwin only)])],
124 # May be in source $withval/CoreFoundation/StringEncodings.subproj.
125 # Should have been in framework $withval/CoreFoundation.framework/Headers.
127 $withval/CoreFoundation/StringEncodings.subproj \
128 $withval/StringEncodings.subproj \
129 $withval/CoreFoundation.framework/Headers \
133 if test -r $d/CFStringEncodingConverter.h; then
134 ln -sfh $d include/CoreFoundation