Skip to content

Commit

Permalink
configure and pkg-config changes:
Browse files Browse the repository at this point in the history
- Revert default prefix to autoconf default (/usr/local)
- Fix pkg-config libraries when just building static libraries
  • Loading branch information
michaelrsweet committed Oct 19, 2024
1 parent 5e16813 commit 0455ce2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Changes in CUPS v2.5b1 (TBA)
- Added localizations for deprecated IPP attributes/options (Issue #1020)
- Added support for specifying permissions with the `cupsFileOpen` API.
- Added new `cupsParseOptions2` API with "end" argument.
- Updated documents (Issue #984)
- Updated documentation (Issue #984)
- Updated the configure script to default to installing to /usr/local.
- Updated CUPS to require TLS support - OpenSSL, GNUTLS and LibreSSL are
supported.
- Updated CUPS to require ZLIB.
Expand Down
1 change: 1 addition & 0 deletions config-scripts/cups-common.m4
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ AC_CHECK_HEADER([iconv.h], [
AC_DEFINE([HAVE_ICONV_H], [1], [Have <iconv.h> header?])
SAVELIBS="$SAVELIBS $LIBS"
])
PKGCONFIG_LIBS_STATIC="$PKGCONFIG_LIBS_STATIC $LIBS"
LIBS="$SAVELIBS"
])

Expand Down
4 changes: 1 addition & 3 deletions config-scripts/cups-directories.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ dnl
dnl Licensed under Apache License v2.0. See the file "LICENSE" for more information.
dnl

AC_PREFIX_DEFAULT(/)

dnl Fix "prefix" variable if it hasn't been specified...
AS_IF([test "$prefix" = "NONE"], [
prefix="/"
prefix="/usr/local"
])

dnl Fix "exec_prefix" variable if it hasn't been specified...
Expand Down
14 changes: 10 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@ ac_includes_default="\
#endif"

ac_header_c_list=
ac_default_prefix=/
ac_subst_vars='LTLIBOBJS
LIBOBJS
UNINSTALL_LANGUAGES
Expand Down Expand Up @@ -6177,6 +6176,7 @@ printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h

fi

PKGCONFIG_LIBS_STATIC="$PKGCONFIG_LIBS_STATIC $LIBS"
LIBS="$SAVELIBS"

fi
Expand Down Expand Up @@ -7018,12 +7018,10 @@ esac





if test "$prefix" = "NONE"
then :

prefix="/"
prefix="/usr/local"

fi

Expand Down Expand Up @@ -11851,6 +11849,14 @@ fi



if test x$enable_shared = xno
then :

PKGCONFIG_LIBS="$PKGCONFIG_LIBS $PKGCONFIG_LIBS_STATIC"
PKGCONFIG_LIBS_STATIC=""

fi

INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ sinclude(config-scripts/cups-container.m4)
sinclude(config-scripts/cups-startup.m4)
sinclude(config-scripts/cups-defaults.m4)

dnl Add static libraries when not building shared libraries...
AS_IF([test x$enable_shared = xno], [
PKGCONFIG_LIBS="$PKGCONFIG_LIBS $PKGCONFIG_LIBS_STATIC"
PKGCONFIG_LIBS_STATIC=""
])

dnl See what languages are available and make sure we generate the localization
dnl files as needed...
INSTALL_LANGUAGES=""
Expand Down
3 changes: 1 addition & 2 deletions cups.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@ Version: @CUPS_VERSION@
URL: https://openprinting.github.io/cups/
Cflags: @PKGCONFIG_CFLAGS@
Libs: @PKGCONFIG_LIBS@

Requires.private: @PKGCONFIG_REQUIRES@
Libs.private: @PKGCONFIG_LIBS_STATIC@
Requires: @PKGCONFIG_REQUIRES@

0 comments on commit 0455ce2

Please sign in to comment.