s3:libsmb: use HDR_* defines in cli_pull_raw_error()
[Samba/gebeck_regimport.git] / source3 / m4 / check_path.m4
blobbe31782f2b845d022145fbf13f84184b7d99da1a
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
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)])],
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
30 #################################################
31 # set shrdir for 'make test'
32 selftest_shrdir=""
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)])],
36 [ case "$withval" in
37   yes|no)
38     AC_MSG_WARN([--with-selftest-shrdir called without argument - will use default])
39   ;;
40   * )
41     selftest_shrdir="-s $withval"
42     ;;
43   esac
46 #################################################
47 # set path of samba4's smbtorture
48 smbtorture4_path=""
49 AC_SUBST(smbtorture4_path)
50 smbtorture4_option=""
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)])],
54 [ case "$withval" in
55   yes|no)
56     AC_MSG_ERROR([--with-smbtorture4-path should take a path])
57   ;;
58   * )
59     smbtorture4_path="$withval"
60     if test -z "$smbtorture4_path" -a ! -f $smbtorture4_path; then
61         AC_MSG_ERROR(['$smbtorture_path' does not  exist!])
62     fi
63     smbtorture4_option="-t $withval"
64   ;;
65  esac
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)])],
74 [ case "$withval" in
75   yes|no)
76     AC_MSG_ERROR([--with-selftest-custom-conf should take a path])
77   ;;
78   * )
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!])
82     fi
83     selftest_custom_conf="-c $withval"
84   ;;
85  esac
88 ## check for --enable-debug first before checking CFLAGS before
89 ## so that we don't mix -O and -g
90 debug=no
91 AC_ARG_ENABLE(debug,
92 [AS_HELP_STRING([--enable-debug], [Turn on compiler debugging information (default=no)])],
93     [if eval "test x$enable_debug = xyes"; then
94         debug=yes
95     fi])
97 AC_SUBST(developer)
98 developer=no
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
101         debug=yes
102         developer=yes
103     fi])
105 krb5developer=no
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
108         debug=yes
109         developer=yes
110         krb5_developer=yes
111     fi])
113 picky_developer=no
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
116         debug=yes
117         developer=yes
118         picky_developer=yes
119     fi])
121 AC_ARG_WITH(cfenc,
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.
126 for d in \
127     $withval/CoreFoundation/StringEncodings.subproj \
128     $withval/StringEncodings.subproj \
129     $withval/CoreFoundation.framework/Headers \
130     $withval/Headers \
131     $withval
133     if test -r $d/CFStringEncodingConverter.h; then
134         ln -sfh $d include/CoreFoundation
135     fi
136 done