diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4 index 4c57370e0..032707b99 100644 --- a/config-scripts/cups-directories.m4 +++ b/config-scripts/cups-directories.m4 @@ -9,8 +9,11 @@ dnl Licensed under Apache License v2.0. See the file "LICENSE" for more informa dnl dnl Fix "prefix" variable if it hasn't been specified... -AS_IF([test "$prefix" = "NONE"], [ - prefix="/usr/local" +AS_IF([test "$prefix" = NONE], [ + # Default prefix isn't bound until AC_OUTPUT... + realprefix="/usr/local" +], [ + realprefix="$prefix" ]) dnl Fix "exec_prefix" variable if it hasn't been specified... @@ -18,7 +21,7 @@ AS_IF([test "$exec_prefix" = "NONE"], [ AS_IF([test "$prefix" = "/"], [ exec_prefix="/usr" ], [ - exec_prefix="$prefix" + exec_prefix="$realprefix" ]) ]) @@ -41,7 +44,7 @@ AS_IF([test "$datarootdir" = "\${prefix}/share"], [ AS_IF([test "$prefix" = "/"], [ datarootdir="/usr/share" ], [ - datarootdir="$prefix/share" + datarootdir="$realprefix/share" ]) ]) @@ -50,15 +53,19 @@ AS_IF([test "$datadir" = "\${prefix}/share"], [ AS_IF([test "$prefix" = "/"], [ datadir="/usr/share" ], [ - datadir="$prefix/share" + datadir="$realprefix/share" ]) ], [test "$datadir" = "\${datarootdir}"], [ datadir="$datarootdir" ]) dnl Fix "includedir" variable if it hasn't been specified... -AS_IF([test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"], [ - includedir="/usr/include" +AS_IF([test "$includedir" = "\${prefix}/include"], [ + AS_IF([test "$prefix" = "/"], [ + includedir="/usr/include/libcups2" + ], [ + includedir="$realprefix/include/libcups2" + ]) ]) AS_IF([test "$includedir" != "/usr/include"], [ PKGCONFIG_CFLAGS="$PKGCONFIG_CFLAGS -I$includedir" @@ -73,7 +80,7 @@ AS_IF([test "$localstatedir" = "\${prefix}/var"], [ localstatedir="/var" ]) ], [ - localstatedir="$prefix/var" + localstatedir="$realprefix/var" ]) ]) @@ -86,7 +93,7 @@ AS_IF([test "$sysconfdir" = "\${prefix}/etc"], [ sysconfdir="/etc" ]) ], [ - sysconfdir="$prefix/etc" + sysconfdir="$realprefix/etc" ]) ]) diff --git a/config-scripts/cups-network.m4 b/config-scripts/cups-network.m4 index 6d5e41ea0..c3c699b28 100644 --- a/config-scripts/cups-network.m4 +++ b/config-scripts/cups-network.m4 @@ -61,7 +61,7 @@ AS_IF([test x$enable_domainsocket != xno -a x$default_domainsocket != xno], [ AS_IF([test "x$default_domainsocket" = x], [ AS_CASE(["$host_os_name"], [darwin*], [ # Darwin and macOS do their own thing... - CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd" + CUPS_DEFAULT_DOMAINSOCKET="/private/var/run/cupsd" ], [*], [ # All others use FHS standard... CUPS_DEFAULT_DOMAINSOCKET="$CUPS_STATEDIR/cups.sock" diff --git a/configure b/configure index 3317fcadd..08d0d5546 100755 --- a/configure +++ b/configure @@ -7019,10 +7019,15 @@ esac -if test "$prefix" = "NONE" +if test "$prefix" = NONE then : - prefix="/usr/local" + # Default prefix isn't bound until AC_OUTPUT... + realprefix="/usr/local" + +else $as_nop + + realprefix="$prefix" fi @@ -7036,7 +7041,7 @@ then : else $as_nop - exec_prefix="$prefix" + exec_prefix="$realprefix" fi @@ -7074,7 +7079,7 @@ then : else $as_nop - datarootdir="$prefix/share" + datarootdir="$realprefix/share" fi @@ -7090,7 +7095,7 @@ then : else $as_nop - datadir="$prefix/share" + datadir="$realprefix/share" fi @@ -7101,10 +7106,19 @@ then : fi -if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/" +if test "$includedir" = "\${prefix}/include" +then : + + if test "$prefix" = "/" then : - includedir="/usr/include" + includedir="/usr/include/libcups2" + +else $as_nop + + includedir="$realprefix/include/libcups2" + +fi fi if test "$includedir" != "/usr/include" @@ -7133,7 +7147,7 @@ fi else $as_nop - localstatedir="$prefix/var" + localstatedir="$realprefix/var" fi @@ -7158,7 +7172,7 @@ fi else $as_nop - sysconfdir="$prefix/etc" + sysconfdir="$realprefix/etc" fi @@ -8767,7 +8781,7 @@ then : darwin*) : # Darwin and macOS do their own thing... - CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd" + CUPS_DEFAULT_DOMAINSOCKET="/private/var/run/cupsd" ;; #( *) :