]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-directories.m4
Merge changes from CUPS 1.7svn-r10643
[thirdparty/cups.git] / config-scripts / cups-directories.m4
index 4105ba17f2ff585371a1bc1fb3dc1c04c19f20a7..e6ab4e97b510cc8c7d1bf974ea0942837f86af8c 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: cups-directories.m4 6975 2007-09-18 20:37:09Z mike $"
+dnl "$Id: cups-directories.m4 7799 2008-07-25 20:06:08Z mike $"
 dnl
-dnl   Directory stuff for the Common UNIX Printing System (CUPS).
+dnl   Directory stuff for CUPS.
 dnl
-dnl   Copyright 2007 by Apple Inc.
+dnl   Copyright 2007-2012 by Apple Inc.
 dnl   Copyright 1997-2007 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
@@ -102,11 +102,8 @@ fi
 dnl Fix "libdir" variable...
 if test "$libdir" = "\${exec_prefix}/lib"; then
        case "$uname" in
-               IRIX*)
-                       libdir="$exec_prefix/lib32"
-                       ;;
                Linux*)
-                       if test -d /usr/lib64; then
+                       if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
                                libdir="$exec_prefix/lib64"
                        fi
                        ;;
@@ -118,17 +115,30 @@ if test "$libdir" = "\${exec_prefix}/lib"; then
        esac
 fi
 
+dnl Setup private include directory...
+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)
+
 dnl Setup init.d locations...
 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
@@ -140,7 +150,7 @@ if test x$rcdir = x; then
                        # Darwin and MacOS X...
                        if test -x /sbin/launchd; then
                                INITDDIR="/System/Library/LaunchDaemons"
-                       else 
+                       else
                                INITDDIR="/System/Library/StartupItems/PrintingServices"
                        fi
                        ;;
@@ -156,13 +166,6 @@ if test x$rcdir = x; then
                        RCSTOP="620"
                        ;;
 
-               IRIX*)
-                       # IRIX
-                       INITDIR="/etc"
-                       RCSTART="60"
-                       RCSTOP="25"
-                       ;;
-
                Linux | GNU | GNU/k*BSD*)
                        # Linux/HURD seems to choose an init.d directory at random...
                        if test -d /sbin/init.d; then
@@ -192,8 +195,12 @@ if test x$rcdir = x; then
 
                SunOS*)
                        # Solaris
-                       INITDIR="/etc"
-                       RCSTART="81"
+                       if test "x$smfmanifestdir" != x; then
+                               SMFMANIFESTDIR=$smfmanifestdir
+                       else
+                               INITDIR="/etc"
+                               RCSTART="81"
+                       fi
                        ;;
 
                *)
@@ -201,7 +208,7 @@ if test x$rcdir = x; then
                        ;;
 
        esac
-else
+elif test "x$rcdir" != xno; then
        if test "x$rclevels" = x; then
                INITDDIR="$rcdir"
        else
@@ -214,6 +221,7 @@ AC_SUBST(INITDDIR)
 AC_SUBST(RCLEVELS)
 AC_SUBST(RCSTART)
 AC_SUBST(RCSTOP)
+AC_SUBST(SMFMANIFESTDIR)
 
 dnl Xinetd support...
 AC_ARG_WITH(xinetd, [  --with-xinetd           set path for xinetd config files],XINETD="$withval",XINETD="")
@@ -225,6 +233,8 @@ if test "x$XINETD" = x -a ! -x /sbin/launchd; then
                        break
                fi
        done
+elif test "x$XINETD" = xno; then
+       XINETD=""
 fi
 
 AC_SUBST(XINETD)
@@ -402,10 +412,19 @@ AC_DEFINE_UNQUOTED(CUPS_SERVERROOT, "$sysconfdir/cups")
 AC_SUBST(CUPS_SERVERROOT)
 
 # Transient run-time state
-CUPS_STATEDIR="$localstatedir/run/cups"
-AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
+case "$uname" in
+       Darwin*)
+               # Darwin (OS X)
+               CUPS_STATEDIR="$CUPS_SERVERROOT"
+               ;;
+       *)
+               # All others
+               CUPS_STATEDIR="$localstatedir/run/cups"
+               ;;
+esac
+AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
 AC_SUBST(CUPS_STATEDIR)
 
 dnl
-dnl End of "$Id: cups-directories.m4 6975 2007-09-18 20:37:09Z mike $".
+dnl End of "$Id: cups-directories.m4 7799 2008-07-25 20:06:08Z mike $".
 dnl