cups-directories.m4 [plain text]
AC_PREFIX_DEFAULT(/)
if test "$prefix" = "NONE"; then
prefix="/"
fi
if test "$exec_prefix" = "NONE"; then
if test "$prefix" = "/"; then
exec_prefix="/usr"
else
exec_prefix="$prefix"
fi
fi
if test "$bindir" = "\${exec_prefix}/bin"; then
bindir="$exec_prefix/bin"
fi
AC_DEFINE_UNQUOTED(CUPS_BINDIR, "$bindir")
if test "$sbindir" = "\${exec_prefix}/sbin"; then
sbindir="$exec_prefix/sbin"
fi
AC_DEFINE_UNQUOTED(CUPS_SBINDIR, "$sbindir")
if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
sharedstatedir="/usr/com"
fi
if test "$datarootdir" = "\${prefix}/share"; then
if test "$prefix" = "/"; then
datarootdir="/usr/share"
else
datarootdir="$prefix/share"
fi
fi
if test "$datadir" = "\${prefix}/share"; then
if test "$prefix" = "/"; then
datadir="/usr/share"
else
datadir="$prefix/share"
fi
elif test "$datadir" = "\${datarootdir}"; then
datadir="$datarootdir"
fi
if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then
includedir="/usr/include"
fi
if test "$localstatedir" = "\${prefix}/var"; then
if test "$prefix" = "/"; then
if test "$uname" = Darwin; then
localstatedir="/private/var"
else
localstatedir="/var"
fi
else
localstatedir="$prefix/var"
fi
fi
if test "$sysconfdir" = "\${prefix}/etc"; then
if test "$prefix" = "/"; then
if test "$uname" = Darwin; then
sysconfdir="/private/etc"
else
sysconfdir="/etc"
fi
else
sysconfdir="$prefix/etc"
fi
fi
if test "$libdir" = "\${exec_prefix}/lib"; then
case "$uname" in
Linux*)
if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
libdir="$exec_prefix/lib64"
fi
;;
HP-UX*)
if test -d /usr/lib/hpux32; then
libdir="$exec_prefix/lib/hpux32"
fi
;;
esac
fi
AC_ARG_WITH(privateinclude, [ --with-privateinclude set path for private include files, default=none],privateinclude="$withval",privateinclude="")
if test "x$privateinclude" != x -a "x$privateinclude" != xnone; then
PRIVATEINCLUDE="$privateinclude/cups"
else
privateinclude=""
PRIVATEINCLUDE=""
fi
AC_SUBST(privateinclude)
AC_SUBST(PRIVATEINCLUDE)
AC_ARG_WITH(rcdir, [ --with-rcdir set path for rc scripts],rcdir="$withval",rcdir="")
AC_ARG_WITH(rclevels, [ --with-rclevels set run levels for rc scripts],rclevels="$withval",rclevels="2 3 5")
AC_ARG_WITH(rcstart, [ --with-rcstart set start number for rc scripts],rcstart="$withval",rcstart="99")
AC_ARG_WITH(rcstop, [ --with-rcstop set stop number for rc scripts],rcstop="$withval",rcstop="00")
AC_ARG_WITH(smfmanifestdir, [ --with-smfmanifestdir set path for Solaris SMF manifest],smfmanifestdir="$withval",smfmanifestdir="")
INITDIR=""
INITDDIR=""
RCLEVELS="$rclevels"
RCSTART="$rcstart"
RCSTOP="$rcstop"
SMFMANIFESTDIR=""
if test x$rcdir = x; then
case "$uname" in
AIX*)
INITDIR="/etc/rc.d"
;;
Darwin*)
if test -x /sbin/launchd; then
INITDDIR="/System/Library/LaunchDaemons"
else
INITDDIR="/System/Library/StartupItems/PrintingServices"
fi
;;
FreeBSD* | OpenBSD* | MirBSD* | ekkoBSD*)
;;
HP-UX*)
INITDIR="/sbin"
RCLEVELS="2"
RCSTART="380"
RCSTOP="620"
;;
Linux | GNU | GNU/k*BSD*)
if test -d /sbin/init.d; then
INITDIR="/sbin/init.d"
else
if test -d /etc/init.d; then
INITDIR="/etc"
else
INITDIR="/etc/rc.d"
fi
fi
RCSTART="81"
RCSTOP="36"
;;
NetBSD*)
INITDDIR="/etc/rc.d"
;;
OSF1*)
INITDIR="/sbin"
;;
SunOS*)
if test "x$smfmanifestdir" != x; then
SMFMANIFESTDIR=$smfmanifestdir
else
INITDIR="/etc"
RCSTART="81"
fi
;;
*)
INITDIR="/etc"
;;
esac
elif test "x$rcdir" != xno; then
if test "x$rclevels" = x; then
INITDDIR="$rcdir"
else
INITDIR="$rcdir"
fi
fi
AC_SUBST(INITDIR)
AC_SUBST(INITDDIR)
AC_SUBST(RCLEVELS)
AC_SUBST(RCSTART)
AC_SUBST(RCSTOP)
AC_SUBST(SMFMANIFESTDIR)
AC_ARG_WITH(xinetd, [ --with-xinetd set path for xinetd config files],XINETD="$withval",XINETD="")
if test "x$XINETD" = x -a ! -x /sbin/launchd; then
for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do
if test -d $dir; then
XINETD="$dir"
break
fi
done
elif test "x$XINETD" = xno; then
XINETD=""
fi
AC_SUBST(XINETD)
AC_ARG_WITH(lpdconfig, [ --with-lpdconfig set URI for LPD config file],
LPDCONFIG="$withval", LPDCONFIG="")
if test "x$LPDCONFIG" = x; then
if test -f /System/Library/LaunchDaemons/org.cups.cups-lpd.plist; then
LPDCONFIG="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
elif test "x$XINETD" != x; then
LPDCONFIG="xinetd://$XINETD/cups-lpd"
fi
fi
if test "x$LPDCONFIG" = xoff; then
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "")
else
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "$LPDCONFIG")
fi
AC_ARG_WITH(smbconfig, [ --with-smbconfig set URI for Samba config file],
SMBCONFIG="$withval", SMBCONFIG="")
if test "x$SMBCONFIG" = x; then
if test -f /System/Library/LaunchDaemons/smbd.plist; then
SMBCONFIG="launchd:///System/Library/LaunchDaemons/smbd.plist"
else
for dir in /etc /etc/samba /usr/local/etc; do
if test -f $dir/smb.conf; then
SMBCONFIG="samba://$dir/smb.conf"
break
fi
done
fi
fi
if test "x$SMBCONFIG" = xoff; then
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "")
else
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "$SMBCONFIG")
fi
AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cachedir="$withval",cachedir="")
if test x$cachedir = x; then
if test "x$uname" = xDarwin; then
CUPS_CACHEDIR="$localstatedir/spool/cups/cache"
else
CUPS_CACHEDIR="$localstatedir/cache/cups"
fi
else
CUPS_CACHEDIR="$cachedir"
fi
AC_DEFINE_UNQUOTED(CUPS_CACHEDIR, "$CUPS_CACHEDIR")
AC_SUBST(CUPS_CACHEDIR)
CUPS_DATADIR="$datadir/cups"
AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
AC_SUBST(CUPS_DATADIR)
AC_ARG_WITH(icondir, [ --with-icondir set path for application icons],icondir="$withval",icondir="")
if test "x$icondir" = x -a -d /usr/share/icons; then
ICONDIR="/usr/share/icons"
else
ICONDIR="$icondir"
fi
AC_SUBST(ICONDIR)
AC_ARG_WITH(menudir, [ --with-menudir set path for application menus],menudir="$withval",menudir="")
if test "x$menudir" = x -a -d /usr/share/applications; then
MENUDIR="/usr/share/applications"
else
MENUDIR="$menudir"
fi
AC_SUBST(MENUDIR)
AC_ARG_WITH(docdir, [ --with-docdir set path for documentation],docdir="$withval",docdir="")
if test x$docdir = x; then
CUPS_DOCROOT="$datadir/doc/cups"
docdir="$datadir/doc/cups"
else
CUPS_DOCROOT="$docdir"
fi
AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$docdir")
AC_SUBST(CUPS_DOCROOT)
AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="")
if test "x$fontpath" = "x"; then
CUPS_FONTPATH="$datadir/cups/fonts"
else
CUPS_FONTPATH="$fontpath"
fi
AC_SUBST(CUPS_FONTPATH)
AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
if test "$localedir" = "\${datarootdir}/locale"; then
case "$uname" in
Linux | GNU | *BSD* | Darwin*)
CUPS_LOCALEDIR="$datarootdir/locale"
;;
OSF1* | AIX*)
CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
;;
*)
CUPS_LOCALEDIR="$exec_prefix/lib/locale"
;;
esac
else
CUPS_LOCALEDIR="$localedir"
fi
AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
AC_SUBST(CUPS_LOCALEDIR)
AC_ARG_WITH(logdir, [ --with-logdir set path for log files],logdir="$withval",logdir="")
if test x$logdir = x; then
CUPS_LOGDIR="$localstatedir/log/cups"
AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$localstatedir/log/cups")
else
CUPS_LOGDIR="$logdir"
fi
AC_DEFINE_UNQUOTED(CUPS_LOGDIR, "$CUPS_LOGDIR")
AC_SUBST(CUPS_LOGDIR)
CUPS_REQUESTS="$localstatedir/spool/cups"
AC_DEFINE_UNQUOTED(CUPS_REQUESTS, "$localstatedir/spool/cups")
AC_SUBST(CUPS_REQUESTS)
case "$uname" in
*BSD* | Darwin*)
INSTALL_SYSV=""
CUPS_SERVERBIN="$exec_prefix/libexec/cups"
;;
*)
INSTALL_SYSV="install-sysv"
CUPS_SERVERBIN="$exec_prefix/lib/cups"
;;
esac
AC_DEFINE_UNQUOTED(CUPS_SERVERBIN, "$CUPS_SERVERBIN")
AC_SUBST(CUPS_SERVERBIN)
AC_SUBST(INSTALL_SYSV)
CUPS_SERVERROOT="$sysconfdir/cups"
AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
AC_SUBST(CUPS_SERVERROOT)
AC_ARG_WITH(rundir, [ --with-rundir set transient run-time state directory],CUPS_STATEDIR="$withval",[
case "$uname" in
Darwin*)
CUPS_STATEDIR="$CUPS_SERVERROOT"
;;
*)
CUPS_STATEDIR="$localstatedir/run/cups"
;;
esac])
AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
AC_SUBST(CUPS_STATEDIR)