| 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 | #################################################
|
|---|
| 13 | # Directory handling stuff to support both the
|
|---|
| 14 | # legacy SAMBA directories and FHS compliant
|
|---|
| 15 | # ones...
|
|---|
| 16 | AC_PREFIX_DEFAULT(/usr/local/samba)
|
|---|
| 17 |
|
|---|
| 18 | rootsbindir="\${SBINDIR}"
|
|---|
| 19 | lockdir="\${VARDIR}/locks"
|
|---|
| 20 | piddir="\${VARDIR}/locks"
|
|---|
| 21 | ncalrpcdir="\${VARDIR}/ncalrpc"
|
|---|
| 22 | nmbdsocketdir="\${VARDIR}/nmbd"
|
|---|
| 23 | test "${mandir}" || mandir="\${prefix}/man"
|
|---|
| 24 | logfilebase="\${VARDIR}"
|
|---|
| 25 | privatedir="\${prefix}/private"
|
|---|
| 26 | test "${libdir}" || libdir="\${prefix}/lib"
|
|---|
| 27 | modulesdir="${libdir}"
|
|---|
| 28 | pammodulesdir="${libdir}/security"
|
|---|
| 29 | configdir="${libdir}"
|
|---|
| 30 | swatdir="\${prefix}/swat"
|
|---|
| 31 | codepagedir="\${MODULESDIR}"
|
|---|
| 32 | statedir="\${LOCKDIR}"
|
|---|
| 33 | cachedir="\${LOCKDIR}"
|
|---|
| 34 | localedir="\${prefix}/share/locale"
|
|---|
| 35 |
|
|---|
| 36 | AC_ARG_WITH(fhs,
|
|---|
| 37 | [AS_HELP_STRING([--with-fhs],[Use FHS-compliant paths (default=no)])],
|
|---|
| 38 | [ case "$withval" in
|
|---|
| 39 | yes)
|
|---|
| 40 | lockdir="\${VARDIR}/lib/samba"
|
|---|
| 41 | piddir="\${VARDIR}/run"
|
|---|
| 42 | mandir="\${prefix}/share/man"
|
|---|
| 43 | logfilebase="\${VARDIR}/log/samba"
|
|---|
| 44 | privatedir="\${CONFIGDIR}/private"
|
|---|
| 45 | test "${libdir}" || libdir="\${prefix}/lib"
|
|---|
| 46 | modulesdir="${libdir}/samba"
|
|---|
| 47 | configdir="\${sysconfdir}/samba"
|
|---|
| 48 | swatdir="\${DATADIR}/samba/swat"
|
|---|
| 49 | codepagedir="\${MODULESDIR}"
|
|---|
| 50 | statedir="\${VARDIR}/lib/samba"
|
|---|
| 51 | cachedir="\${VARDIR}/lib/samba"
|
|---|
| 52 | ncalrpcdir="\${VARDIR}/ncalrpc"
|
|---|
| 53 | AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
|
|---|
| 54 | ;;
|
|---|
| 55 | esac])
|
|---|
| 56 |
|
|---|
| 57 | #################################################
|
|---|
| 58 | # set private directory location
|
|---|
| 59 | AC_ARG_WITH(privatedir,
|
|---|
| 60 | [AS_HELP_STRING([--with-privatedir=DIR], [Where to put smbpasswd ($ac_default_prefix/private)])],
|
|---|
| 61 | [ case "$withval" in
|
|---|
| 62 | yes|no)
|
|---|
| 63 | #
|
|---|
| 64 | # Just in case anybody calls it without argument
|
|---|
| 65 | #
|
|---|
| 66 | AC_MSG_WARN([--with-privatedir called without argument - will use default])
|
|---|
| 67 | ;;
|
|---|
| 68 | * )
|
|---|
| 69 | privatedir="$withval"
|
|---|
| 70 | ;;
|
|---|
| 71 | esac])
|
|---|
| 72 |
|
|---|
| 73 | #################################################
|
|---|
| 74 | # set root sbin directory location
|
|---|
| 75 | AC_ARG_WITH(rootsbindir,
|
|---|
| 76 | [AS_HELP_STRING([--with-rootsbindir=DIR], [Which directory to use for root sbin ($ac_default_prefix/sbin)])],
|
|---|
| 77 | [ case "$withval" in
|
|---|
| 78 | yes|no)
|
|---|
| 79 | #
|
|---|
| 80 | # Just in case anybody calls it without argument
|
|---|
| 81 | #
|
|---|
| 82 | AC_MSG_WARN([--with-rootsbindir called without argument - will use default])
|
|---|
| 83 | ;;
|
|---|
| 84 | * )
|
|---|
| 85 | rootsbindir="$withval"
|
|---|
| 86 | ;;
|
|---|
| 87 | esac])
|
|---|
| 88 |
|
|---|
| 89 | #################################################
|
|---|
| 90 | # set lock directory location
|
|---|
| 91 | AC_ARG_WITH(lockdir,
|
|---|
| 92 | [AS_HELP_STRING([--with-lockdir=DIR], [Where to put lock files ($ac_default_prefix/var/locks)])],
|
|---|
| 93 | [ case "$withval" in
|
|---|
| 94 | yes|no)
|
|---|
| 95 | #
|
|---|
| 96 | # Just in case anybody calls it without argument
|
|---|
| 97 | #
|
|---|
| 98 | AC_MSG_WARN([--with-lockdir called without argument - will use default])
|
|---|
| 99 | ;;
|
|---|
| 100 | * )
|
|---|
| 101 | lockdir="$withval"
|
|---|
| 102 | ;;
|
|---|
| 103 | esac])
|
|---|
| 104 |
|
|---|
| 105 | #################################################
|
|---|
| 106 | # set state directory location
|
|---|
| 107 | AC_ARG_WITH(statedir,
|
|---|
| 108 | [AS_HELP_STRING([--with-statedir=DIR], [Where to put persistent state files ($ac_default_prefix/var/locks)])],
|
|---|
| 109 | [ case "$withval" in
|
|---|
| 110 | yes|no)
|
|---|
| 111 | #
|
|---|
| 112 | # Just in case anybody calls it without argument
|
|---|
| 113 | #
|
|---|
| 114 | AC_MSG_WARN([--with-statedir called without argument - will use default])
|
|---|
| 115 | ;;
|
|---|
| 116 | * )
|
|---|
| 117 | statedir="$withval"
|
|---|
| 118 | ;;
|
|---|
| 119 | esac])
|
|---|
| 120 |
|
|---|
| 121 | #################################################
|
|---|
| 122 | # set cache directory location
|
|---|
| 123 | AC_ARG_WITH(cachedir,
|
|---|
| 124 | [AS_HELP_STRING([--with-cachedir=DIR], [Where to put temporary cache files ($ac_default_prefix/var/locks)])],
|
|---|
| 125 | [ case "$withval" in
|
|---|
| 126 | yes|no)
|
|---|
| 127 | #
|
|---|
| 128 | # Just in case anybody calls it without argument
|
|---|
| 129 | #
|
|---|
| 130 | AC_MSG_WARN([--with-cachedir called without argument - will use default])
|
|---|
| 131 | ;;
|
|---|
| 132 | * )
|
|---|
| 133 | cachedir="$withval"
|
|---|
| 134 | ;;
|
|---|
| 135 | esac])
|
|---|
| 136 |
|
|---|
| 137 | #################################################
|
|---|
| 138 | # set pid directory location
|
|---|
| 139 | AC_ARG_WITH(piddir,
|
|---|
| 140 | [AS_HELP_STRING([--with-piddir=DIR], [Where to put pid files ($ac_default_prefix/var/locks)])],
|
|---|
| 141 | [ case "$withval" in
|
|---|
| 142 | yes|no)
|
|---|
| 143 | #
|
|---|
| 144 | # Just in case anybody calls it without argument
|
|---|
| 145 | #
|
|---|
| 146 | AC_MSG_WARN([--with-piddir called without argument - will use default])
|
|---|
| 147 | ;;
|
|---|
| 148 | * )
|
|---|
| 149 | piddir="$withval"
|
|---|
| 150 | ;;
|
|---|
| 151 | esac])
|
|---|
| 152 |
|
|---|
| 153 | #################################################
|
|---|
| 154 | # set ncalrpc directory location
|
|---|
| 155 | AC_ARG_WITH(ncalrpcdir,
|
|---|
| 156 | [AS_HELP_STRING([--with-ncalrpcdir=DIR], [Where to put ncalrpc sockets ($ac_default_prefix/var/ncalrpc)])],
|
|---|
| 157 | [ case "$withval" in
|
|---|
| 158 | yes|no)
|
|---|
| 159 | #
|
|---|
| 160 | # Just in case anybody calls it without argument
|
|---|
| 161 | #
|
|---|
| 162 | AC_MSG_WARN([--with-ncalrpcdir called without argument - will use default])
|
|---|
| 163 | ;;
|
|---|
| 164 | * )
|
|---|
| 165 | ncalrpcdir="$withval"
|
|---|
| 166 | ;;
|
|---|
| 167 | esac])
|
|---|
| 168 |
|
|---|
| 169 | #################################################
|
|---|
| 170 | # set nmbd socket directory location
|
|---|
| 171 | AC_ARG_WITH(nmbdsocketdir,
|
|---|
| 172 | [AS_HELP_STRING([--with-nmbdsocketdir=DIR], [Where to put the nmbd socket directory ($ac_default_prefix/var/nmbd)])],
|
|---|
| 173 | [ case "$withval" in
|
|---|
| 174 | yes|no)
|
|---|
| 175 | #
|
|---|
| 176 | # Just in case anybody calls it without argument
|
|---|
| 177 | #
|
|---|
| 178 | AC_MSG_WARN([--with-nmbdsocketdir called without argument - will use default])
|
|---|
| 179 | ;;
|
|---|
| 180 | * )
|
|---|
| 181 | nmbdsocketdir="$withval"
|
|---|
| 182 | ;;
|
|---|
| 183 | esac])
|
|---|
| 184 |
|
|---|
| 185 | #################################################
|
|---|
| 186 | # set SWAT directory location
|
|---|
| 187 | AC_ARG_WITH(swatdir,
|
|---|
| 188 | [AS_HELP_STRING([--with-swatdir=DIR], [Where to put SWAT files ($ac_default_prefix/swat)])],
|
|---|
| 189 | [ case "$withval" in
|
|---|
| 190 | yes|no)
|
|---|
| 191 | #
|
|---|
| 192 | # Just in case anybody does it
|
|---|
| 193 | #
|
|---|
| 194 | AC_MSG_WARN([--with-swatdir called without argument - will use default])
|
|---|
| 195 | ;;
|
|---|
| 196 | * )
|
|---|
| 197 | swatdir="$withval"
|
|---|
| 198 | ;;
|
|---|
| 199 | esac])
|
|---|
| 200 |
|
|---|
| 201 | #################################################
|
|---|
| 202 | # set configuration directory location
|
|---|
| 203 | AC_ARG_WITH(configdir,
|
|---|
| 204 | [AS_HELP_STRING([--with-configdir=DIR], [Where to put configuration files ($libdir)])],
|
|---|
| 205 | [ case "$withval" in
|
|---|
| 206 | yes|no)
|
|---|
| 207 | #
|
|---|
| 208 | # Just in case anybody does it
|
|---|
| 209 | #
|
|---|
| 210 | AC_MSG_WARN([--with-configdir called without argument - will use default])
|
|---|
| 211 | ;;
|
|---|
| 212 | * )
|
|---|
| 213 | configdir="$withval"
|
|---|
| 214 | ;;
|
|---|
| 215 | esac])
|
|---|
| 216 |
|
|---|
| 217 | #################################################
|
|---|
| 218 | # set log directory location
|
|---|
| 219 | AC_ARG_WITH(logfilebase,
|
|---|
| 220 | [AS_HELP_STRING([--with-logfilebase=DIR], [Where to put log files ($VARDIR)])],
|
|---|
| 221 | [ case "$withval" in
|
|---|
| 222 | yes|no)
|
|---|
| 223 | #
|
|---|
| 224 | # Just in case anybody does it
|
|---|
| 225 | #
|
|---|
| 226 | AC_MSG_WARN([--with-logfilebase called without argument - will use default])
|
|---|
| 227 | ;;
|
|---|
| 228 | * )
|
|---|
| 229 | logfilebase="$withval"
|
|---|
| 230 | ;;
|
|---|
| 231 | esac])
|
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 | #################################################
|
|---|
| 235 | # set shared modules (internal lib) directory location
|
|---|
| 236 | AC_ARG_WITH(modulesdir,
|
|---|
| 237 | [AS_HELP_STRING([--with-modulesdir=DIR], [Where to put shared modules ($libdir)])],
|
|---|
| 238 | [ case "$withval" in
|
|---|
| 239 | yes|no)
|
|---|
| 240 | #
|
|---|
| 241 | # Just in case anybody does it
|
|---|
| 242 | #
|
|---|
| 243 | AC_MSG_WARN([--with-modulesdir without argument - will use default])
|
|---|
| 244 | ;;
|
|---|
| 245 | * )
|
|---|
| 246 | modulesdir="$withval"
|
|---|
| 247 | ;;
|
|---|
| 248 | esac])
|
|---|
| 249 |
|
|---|
| 250 | #################################################
|
|---|
| 251 | # set PAM modules directory location
|
|---|
|
|---|