]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-directories.m4
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / config-scripts / cups-directories.m4
index a4db002b90b10381a7490f5522ab18a4230ba760..a9dc67b50d8d3ee75370e54de6bfed094a472de1 100644 (file)
@@ -1,25 +1,14 @@
 dnl
-dnl "$Id: cups-directories.m4 5314 2006-03-20 19:06:50Z mike $"
+dnl Directory stuff for CUPS.
 dnl
-dnl   Directory stuff for the Common UNIX Printing System (CUPS).
+dnl Copyright 2007-2014 by Apple Inc.
+dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
 dnl
-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
-dnl   copyright law.  Distribution and use rights are outlined in the file
-dnl   "LICENSE.txt" which should have been included with this file.  If this
-dnl   file is missing or damaged please contact Easy Software Products
-dnl   at:
-dnl
-dnl       Attn: CUPS Licensing Information
-dnl       Easy Software Products
-dnl       44141 Airport View Drive, Suite 204
-dnl       Hollywood, Maryland 20636 USA
-dnl
-dnl       Voice: (301) 373-9600
-dnl       EMail: cups-info@cups.org
-dnl         WWW: http://www.cups.org
+dnl These coded instructions, statements, and computer programs are the
+dnl property of Apple Inc. and are protected by Federal copyright
+dnl law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+dnl which should have been included with this file.  If this file is
+dnl file is missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
 AC_PREFIX_DEFAULT(/)
@@ -57,6 +46,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 +62,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...
@@ -97,97 +97,68 @@ if test "$sysconfdir" = "\${prefix}/etc"; then
        fi
 fi
 
-dnl Fix "libdir" variable for IRIX 6.x...
+dnl Fix "libdir" variable...
 if test "$libdir" = "\${exec_prefix}/lib"; then
-       if test "$uname" = "IRIX"; then
-               libdir="$exec_prefix/lib32"
-       else
-               if test "$uname" = Linux -a -d /usr/lib64; then
-                       libdir="$exec_prefix/lib64"
-               else
-                       libdir="$exec_prefix/lib"
-               fi
-       fi
-fi
-
-dnl Setup init.d locations...
-AC_ARG_WITH(rcdir, [  --with-rcdir            set path for rc scripts],rcdir="$withval",rcdir="")
-
-if test x$rcdir = x; then
        case "$uname" in
-               FreeBSD* | OpenBSD*)
-                       # FreeBSD and OpenBSD
-                       INITDIR=""
-                       INITDDIR=""
-                       ;;
-
-               NetBSD*)
-                       # NetBSD
-                       INITDIR=""
-                       INITDDIR="/etc/rc.d"
-                       ;;
-
-               Darwin*)
-                       # Darwin and MacOS X...
-                       INITDIR=""
-                       AC_CHECK_PROG(INITDDIR, launchd, 
-                               "/System/Library/LaunchDaemons", 
-                               "/System/Library/StartupItems/PrintingServices")
-                       ;;
-
-               Linux | GNU)
-                       # Linux/HURD seems to choose an init.d directory at random...
-                       if test -d /sbin/init.d; then
-                               # SuSE
-                               INITDIR="/sbin/init.d"
-                               INITDDIR=".."
-                       else
-                               if test -d /etc/init.d; then
-                                       # Others
-                                       INITDIR="/etc"
-                                       INITDDIR="../init.d"
-                               else
-                                       # RedHat
-                                       INITDIR="/etc/rc.d"
-                                       INITDDIR="../init.d"
-                               fi
+               Linux*)
+                       if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
+                               libdir="$exec_prefix/lib64"
                        fi
                        ;;
+       esac
+fi
 
-               OSF1* | HP-UX*)
-                       INITDIR="/sbin"
-                       INITDDIR="../init.d"
-                       ;;
-
-               AIX*)
-                       INITDIR="/etc/rc.d"
-                       INITDDIR=".."
-                       ;;
-
-               *)
-                       INITDIR="/etc"
-                       INITDDIR="../init.d"
-                       ;;
+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 LPD sharing support...
+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
 
-       esac
+if test "x$LPDCONFIG" = xoff; then
+       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "")
 else
-       INITDIR=""
-       INITDDIR="$rcdir"
+       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG, "$LPDCONFIG")
 fi
 
-AC_SUBST(INITDIR)
-AC_SUBST(INITDDIR)
+dnl SMB sharing support...
+AC_ARG_WITH(smbconfig, [  --with-smbconfig        set URI for Samba config file],
+       SMBCONFIG="$withval", SMBCONFIG="")
 
-dnl Xinetd support...
-XINETD=""
-for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do
-       if test -d $dir; then
-               XINETD="$dir"
-               break
+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
-done
+fi
 
-AC_SUBST(XINETD)
+if test "x$SMBCONFIG" = xoff; then
+       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "")
+else
+       AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG, "$SMBCONFIG")
+fi
 
 dnl Setup default locations...
 # Cache data...
@@ -195,7 +166,7 @@ AC_ARG_WITH(cachedir, [  --with-cachedir         set path for cache files],cache
 
 if test x$cachedir = x; then
        if test "x$uname" = xDarwin; then
-               CUPS_CACHEDIR="$localstatedir/tmp/cups"
+               CUPS_CACHEDIR="$localstatedir/spool/cups/cache"
        else
                CUPS_CACHEDIR="$localstatedir/cache/cups"
        fi
@@ -210,6 +181,28 @@ CUPS_DATADIR="$datadir/cups"
 AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
 AC_SUBST(CUPS_DATADIR)
 
+# Icon directory
+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)
+
+# Menu directory
+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)
+
 # Documentation files
 AC_ARG_WITH(docdir, [  --with-docdir           set path for documentation],docdir="$withval",docdir="")
 
@@ -236,20 +229,20 @@ AC_SUBST(CUPS_FONTPATH)
 AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
 
 # Locale data
-case "$uname" in
-       Linux | GNU | *BSD* | Darwin*)
-               CUPS_LOCALEDIR="$datadir/locale"
-               ;;
-
-       OSF1* | AIX*)
-               CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
-               ;;
+if test "$localedir" = "\${datarootdir}/locale"; then
+       case "$uname" in
+               Linux | GNU | *BSD* | Darwin*)
+                       CUPS_LOCALEDIR="$datarootdir/locale"
+                       ;;
 
-       *)
-               # This is the standard System V location...
-               CUPS_LOCALEDIR="$exec_prefix/lib/locale"
-               ;;
-esac
+               *)
+                       # This is the standard System V location...
+                       CUPS_LOCALEDIR="$exec_prefix/lib/locale"
+                       ;;
+       esac
+else
+       CUPS_LOCALEDIR="$localedir"
+fi
 
 AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
 AC_SUBST(CUPS_LOCALEDIR)
@@ -295,10 +288,16 @@ 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")
+AC_ARG_WITH(rundir, [  --with-rundir           set transient run-time state directory],CUPS_STATEDIR="$withval",[
+       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 5314 2006-03-20 19:06:50Z mike $".
-dnl