Skip to content

Commit

Permalink
Update default includedir to ${prefix}/include/libcups2
Browse files Browse the repository at this point in the history
Fix default domain socket on macOS.
  • Loading branch information
michaelrsweet committed Nov 18, 2024
1 parent 0da38a5 commit a86819a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 20 deletions.
25 changes: 16 additions & 9 deletions config-scripts/cups-directories.m4
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ 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...
AS_IF([test "$exec_prefix" = "NONE"], [
AS_IF([test "$prefix" = "/"], [
exec_prefix="/usr"
], [
exec_prefix="$prefix"
exec_prefix="$realprefix"
])
])

Expand All @@ -41,7 +44,7 @@ AS_IF([test "$datarootdir" = "\${prefix}/share"], [
AS_IF([test "$prefix" = "/"], [
datarootdir="/usr/share"
], [
datarootdir="$prefix/share"
datarootdir="$realprefix/share"
])
])

Expand All @@ -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"
Expand All @@ -73,7 +80,7 @@ AS_IF([test "$localstatedir" = "\${prefix}/var"], [
localstatedir="/var"
])
], [
localstatedir="$prefix/var"
localstatedir="$realprefix/var"
])
])

Expand All @@ -86,7 +93,7 @@ AS_IF([test "$sysconfdir" = "\${prefix}/etc"], [
sysconfdir="/etc"
])
], [
sysconfdir="$prefix/etc"
sysconfdir="$realprefix/etc"
])
])

Expand Down
2 changes: 1 addition & 1 deletion config-scripts/cups-network.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
34 changes: 24 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -7036,7 +7041,7 @@ then :

else $as_nop

exec_prefix="$prefix"
exec_prefix="$realprefix"

fi

Expand Down Expand Up @@ -7074,7 +7079,7 @@ then :

else $as_nop

datarootdir="$prefix/share"
datarootdir="$realprefix/share"

fi

Expand All @@ -7090,7 +7095,7 @@ then :

else $as_nop

datadir="$prefix/share"
datadir="$realprefix/share"

fi

Expand All @@ -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"
Expand Down Expand Up @@ -7133,7 +7147,7 @@ fi

else $as_nop

localstatedir="$prefix/var"
localstatedir="$realprefix/var"

fi

Expand All @@ -7158,7 +7172,7 @@ fi

else $as_nop

sysconfdir="$prefix/etc"
sysconfdir="$realprefix/etc"

fi

Expand Down Expand Up @@ -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"
;; #(
*) :

Expand Down

0 comments on commit a86819a

Please sign in to comment.