]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
configure and pkg-config changes:
authorMichael R Sweet <msweet@msweet.org>
Sat, 19 Oct 2024 19:09:54 +0000 (15:09 -0400)
committerMichael R Sweet <msweet@msweet.org>
Sat, 19 Oct 2024 19:09:54 +0000 (15:09 -0400)
- Revert default prefix to autoconf default (/usr/local)
- Fix pkg-config libraries when just building static libraries

CHANGES.md
config-scripts/cups-common.m4
config-scripts/cups-directories.m4
configure
configure.ac
cups.pc.in

index f2b9a26ad0ce7609d8d66ec4f937cdc3d001723f..246a268c554e8f5a5d833d19b12d411645ba92ab 100644 (file)
@@ -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.
index e445230844c004d7902d6b207f6dfa1924950a84..b42220906b2a6e204485de23072fd733484b8f81 100644 (file)
@@ -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"
 ])
 
index 069ee7bab1fe8b8bb149f3001546defabb454032..4c57370e07b02ba3c4b14f4d766022e80976c129 100644 (file)
@@ -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...
index dfcd416c8bdcb72dfb252dd88fb48f6f487c8d88..b26b1b31539068295799db935a649e27f7d087e3 100755 (executable)
--- a/configure
+++ b/configure
@@ -647,7 +647,6 @@ ac_includes_default="\
 #endif"
 
 ac_header_c_list=
-ac_default_prefix=/
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 UNINSTALL_LANGUAGES
@@ -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
@@ -7018,12 +7018,10 @@ esac
 
 
 
-
-
 if test "$prefix" = "NONE"
 then :
 
-    prefix="/"
+    prefix="/usr/local"
 
 fi
 
 
 
 
+if test x$enable_shared = xno
+then :
+
+    PKGCONFIG_LIBS="$PKGCONFIG_LIBS $PKGCONFIG_LIBS_STATIC"
+    PKGCONFIG_LIBS_STATIC=""
+
+fi
+
 INSTALL_LANGUAGES=""
 UNINSTALL_LANGUAGES=""
 LANGFILES=""
index 608c0499ed70a014faa33b0a063b60140c9299d0..fe2e252e4bc40cbc5cfdaff044639074106938e4 100644 (file)
@@ -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=""
index 9781b8b326eb91ff65070e98c6d9a06a6ca8cb45..56f17f8cff7f962f7ec2d86d4a936102ca656b2b 100644 (file)
@@ -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@