1dnl SMB Build Environment Path Checks 2dnl ------------------------------------------------------- 3dnl Copyright (C) Stefan (metze) Metzmacher 2004 4dnl Released under the GNU GPL 5dnl ------------------------------------------------------- 6dnl 7 8AC_LIBREPLACE_LOCATION_CHECKS 9 10################################################# 11# Directory handling stuff to support both the 12# legacy SAMBA directories and FHS compliant 13# ones... 14AC_PREFIX_DEFAULT(/usr/local/samba) 15 16# Defaults and --without-fhs 17logfilebase="${localstatedir}" 18lockdir="${localstatedir}/locks" 19piddir="${localstatedir}/run" 20privatedir="\${prefix}/private" 21modulesdir="\${prefix}/modules" 22winbindd_socket_dir="${localstatedir}/run/winbind_pipe" 23 24AC_ARG_WITH(fhs, 25[ --with-fhs Use FHS-compliant paths (default=no)], 26 lockdir="${localstatedir}/lib/samba" 27 piddir="${localstatedir}/run/samba" 28 logfilebase="${localstatedir}/log/samba" 29 privatedir="${localstatedir}/lib/samba/private" 30 sysconfdir="${sysconfdir}/samba" 31 modulesdir="${libdir}/samba" 32 datadir="${datadir}/samba" 33 includedir="${includedir}/samba-4.0" 34 winbindd_socket_dir="${localstatedir}/run/samba/winbind_pipe" 35) 36 37################################################# 38# set private directory location 39AC_ARG_WITH(privatedir, 40[ --with-privatedir=DIR Where to put sam.ldb and other private files containing key material ($ac_default_prefix/private)], 41[ case "$withval" in 42 yes|no) 43 # 44 # Just in case anybody calls it without argument 45 # 46 AC_MSG_WARN([--with-privatedir called without argument - will use default]) 47 ;; 48 * ) 49 privatedir="$withval" 50 ;; 51 esac]) 52 53################################################# 54# set where the winbindd socket should be put 55AC_ARG_WITH(winbindd-socket-dir, 56[ --with-winbindd-socket-dir=DIR Where to put the winbindd socket ($ac_default_prefix/run/winbind_pipe)], 57[ case "$withval" in 58 yes|no) 59 # 60 # Just in case anybody calls it without argument 61 # 62 AC_MSG_WARN([--with-winbind-socketdir called without argument - will use default]) 63 ;; 64 * ) 65 winbindd_socket_dir="$withval" 66 ;; 67 esac]) 68 69################################################# 70# set lock directory location 71AC_ARG_WITH(lockdir, 72[ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)], 73[ case "$withval" in 74 yes|no) 75 # 76 # Just in case anybody calls it without argument 77 # 78 AC_MSG_WARN([--with-lockdir called without argument - will use default]) 79 ;; 80 * ) 81 lockdir="$withval" 82 ;; 83 esac]) 84 85################################################# 86# set pid directory location 87AC_ARG_WITH(piddir, 88[ --with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)], 89[ case "$withval" in 90 yes|no) 91 # 92 # Just in case anybody calls it without argument 93 # 94 AC_MSG_WARN([--with-piddir called without argument - will use default]) 95 ;; 96 * ) 97 piddir="$withval" 98 ;; 99 esac]) 100 101################################################# 102# set log directory location 103AC_ARG_WITH(logfilebase, 104[ --with-logfilebase=DIR Where to put log files (\$(VARDIR))], 105[ case "$withval" in 106 yes|no) 107 # 108 # Just in case anybody does it 109 # 110 AC_MSG_WARN([--with-logfilebase called without argument - will use default]) 111 ;; 112 * ) 113 logfilebase="$withval" 114 ;; 115 esac]) 116 117 118AC_SUBST(lockdir) 119AC_SUBST(piddir) 120AC_SUBST(logfilebase) 121AC_SUBST(privatedir) 122AC_SUBST(bindir) 123AC_SUBST(sbindir) 124AC_SUBST(winbindd_socket_dir) 125AC_SUBST(modulesdir) 126 127################################################# 128# set prefix for 'make test' 129# this is needed to workarround the 108 char 130# unix socket path limitation! 131# 132selftest_prefix="./st" 133AC_SUBST(selftest_prefix) 134AC_ARG_WITH(selftest-prefix, 135[ --with-selftest-prefix=DIR The prefix where make test will be runned ($selftest_prefix)], 136[ case "$withval" in 137 yes|no) 138 AC_MSG_WARN([--with-selftest-prefix called without argument - will use default]) 139 ;; 140 * ) 141 selftest_prefix="$withval" 142 ;; 143 esac]) 144 145debug=no 146AC_ARG_ENABLE(debug, 147[ --enable-debug Turn on compiler debugging information (default=no)], 148 [if test x$enable_debug = xyes; then 149 debug=yes 150 fi]) 151 152developer=no 153AC_SUBST(developer) 154AC_ARG_ENABLE(developer, 155[ --enable-developer Turn on developer warnings and debugging (default=no)], 156 [if test x$enable_developer = xyes; then 157 debug=yes 158 developer=yes 159 fi]) 160 161dnl disable these external libs 162AC_ARG_WITH(disable-ext-lib, 163[ --with-disable-ext-lib=LIB Comma-seperated list of external libraries], 164[ if test $withval; then 165 for i in `echo $withval | sed -e's/,/ /g'` 166 do 167 eval SMB_$i=NO 168 done 169fi ]) 170