]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-directories.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-directories.m4
index 836ec6742ff9f300a260a0cc5f4f963c8f986bb1..595512b4396d40a43288157c1439f18bc1d622c4 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: cups-directories.m4 4933 2006-01-16 00:26:57Z mike $"
+dnl "$Id: cups-directories.m4 5905 2006-08-29 20:48:59Z mike $"
 dnl
 dnl   Directory stuff for the Common UNIX Printing System (CUPS).
 dnl
-dnl   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
 dnl   property of Easy Software Products and are protected by Federal
@@ -57,6 +57,15 @@ if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
        sharedstatedir="/usr/com"
 fi
 
+dnl Fix "datarootdir" variable if it hasn't been specified...
+if test "$datarootdir" = "\${prefix}/share"; then
+       if test "$prefix" = "/"; then
+               datarootdir="/usr/share"
+       else
+               datarootdir="$prefix/share"
+       fi
+fi
+
 dnl Fix "datadir" variable if it hasn't been specified...
 if test "$datadir" = "\${prefix}/share"; then
        if test "$prefix" = "/"; then
@@ -64,6 +73,8 @@ if test "$datadir" = "\${prefix}/share"; then
        else
                datadir="$prefix/share"
        fi
+elif test "$datadir" = "\${datarootdir}"; then
+       datadir="$datarootdir"
 fi
 
 dnl Fix "includedir" variable if it hasn't been specified...
@@ -99,10 +110,14 @@ fi
 
 dnl Fix "libdir" variable for IRIX 6.x...
 if test "$libdir" = "\${exec_prefix}/lib"; then
-       if test "$uname" = "IRIX" -a $uversion -ge 62; then
+       if test "$uname" = "IRIX"; then
                libdir="$exec_prefix/lib32"
        else
-               libdir="$exec_prefix/lib"
+               if test "$uname" = Linux -a -d /usr/lib64; then
+                       libdir="$exec_prefix/lib64"
+               else
+                       libdir="$exec_prefix/lib"
+               fi
        fi
 fi
 
@@ -111,7 +126,7 @@ AC_ARG_WITH(rcdir, [  --with-rcdir            set path for rc scripts],rcdir="$w
 
 if test x$rcdir = x; then
        case "$uname" in
-               FreeBSD* | OpenBSD*)
+               FreeBSD* | OpenBSD* | MirBsD* | ekkoBSD*)
                        # FreeBSD and OpenBSD
                        INITDIR=""
                        INITDDIR=""
@@ -126,7 +141,11 @@ if test x$rcdir = x; then
                Darwin*)
                        # Darwin and MacOS X...
                        INITDIR=""
-                       INITDDIR="/System/Library/StartupItems/PrintingServices"
+                       if test -x /sbin/launchd; then
+                               INITDDIR="/System/Library/LaunchDaemons"
+                       else 
+                               INITDDIR="/System/Library/StartupItems/PrintingServices"
+                       fi
                        ;;
 
                Linux | GNU)
@@ -172,12 +191,30 @@ fi
 AC_SUBST(INITDIR)
 AC_SUBST(INITDDIR)
 
+dnl Xinetd support...
+XINETD=""
+
+if test ! -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
+fi
+
+AC_SUBST(XINETD)
+
 dnl Setup default locations...
 # Cache data...
 AC_ARG_WITH(cachedir, [  --with-cachedir         set path for cache files],cachedir="$withval",cachedir="")
 
 if test x$cachedir = x; then
-       CUPS_CACHEDIR="$localstatedir/cache/cups"
+       if test "x$uname" = xDarwin; then
+               CUPS_CACHEDIR="$localstatedir/spool/cups/cache"
+       else
+               CUPS_CACHEDIR="$localstatedir/cache/cups"
+       fi
 else
        CUPS_CACHEDIR="$cachedir"
 fi
@@ -260,7 +297,7 @@ case "$uname" in
        *)
                # All others
                INSTALL_SYSV="install-sysv"
-               CUPS_SERVERBIN="$libdir/cups"
+               CUPS_SERVERBIN="$exec_prefix/lib/cups"
                ;;
 esac
 
@@ -279,5 +316,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
 AC_SUBST(CUPS_STATEDIR)
 
 dnl
-dnl End of "$Id: cups-directories.m4 4933 2006-01-16 00:26:57Z mike $".
+dnl End of "$Id: cups-directories.m4 5905 2006-08-29 20:48:59Z mike $".
 dnl