Skip to content

Commit

Permalink
Update to latest libcups and sync up configure options.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Jun 18, 2023
1 parent f3d55e2 commit d8cb62a
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 20 deletions.
82 changes: 70 additions & 12 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ with_pdfrip
enable_pam
enable_debug
enable_maintainer
enable_sanitizer
with_sanitizer
with_ldflags
'
ac_precious_vars='build_alias
Expand Down Expand Up @@ -1364,13 +1364,14 @@ Optional Features:
--enable-libpam use libpam for authentication, default=auto
--enable-debug turn on debugging, default=no
--enable-maintainer turn on maintainer mode, default=no
--enable-sanitizer build with AddressSanitizer, default=no
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pdfrip=... set PDF RIP to use (auto, coregraphics, pdftoppm,
none)
--with-sanitizer build with address, leak, memory, thread, or
undefined sanitizer, default=no
--with-ldflags=... Specify additional LDFLAGS
Some influential environment variables:
Expand Down Expand Up @@ -4191,12 +4192,24 @@ then :
enableval=$enable_maintainer;
fi
# Check whether --enable-sanitizer was given.
if test ${enable_sanitizer+y}
# Check whether --with-sanitizer was given.
if test ${with_sanitizer+y}
then :
enableval=$enable_sanitizer;
withval=$with_sanitizer;
fi
if test "x$with_sanitizer" = x
then :
with_sanitizer="address"
elif test "$with_sanitizer" != address -a "$with_sanitizer" != leak -a "$with_sanitizer" != memory -a "$with_sanitizer" != no -a "$with_sanitizer" != thread -a "$with_sanitizer" != undefined
then :
as_fn_error $? "Unsupported --with-sanitizer value \"$with_sanitizer\" specified." "$LINENO" 5
fi
if test x$enable_debug = xyes
then :
Expand All @@ -4219,17 +4232,22 @@ WARNINGS=""
if test -n "$GCC"
then :
if test x$enable_sanitizer = xyes
if test x$with_sanitizer != xno
then :
# Use -fsanitize=FOO with debugging...
OPTIM="$OPTIM -fsanitize=$with_sanitizer"
elif echo "$CPPFLAGS $CFLAGS" | grep -q _FORTIFY_SOURCE
then :
# Use -fsanitize=address with debugging...
OPTIM="$OPTIM -fsanitize=address"
# Don't add _FORTIFY_SOURCE if it is already there
else $as_nop
# Otherwise use the Fortify enhancements to catch any unbounded
# string operations...
CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=3"
fi
Expand Down Expand Up @@ -4347,27 +4365,67 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
esac
CFLAGS="$OLDCFLAGS"
case "$host_os_name" in #(
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OS-specific compiler options" >&5
printf %s "checking for OS-specific compiler options... " >&6; }
case "$host_os_name" in #(
linux*) :
# Make sure we get the full set of Linux APIs from the headers...
CPPFLAGS="$CPPFLAGS -D__USE_MISC -D_GNU_SOURCE"
# Mark read-only sections as relocatable to random addresses...
LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -D__USE_MISC -D_GNU_SOURCE -Wl,-z,relro,-z,now" >&5
printf "%s\n" "-D__USE_MISC -D_GNU_SOURCE -Wl,-z,relro,-z,now" >&6; }
;; #(
darwin*) :
if test "$host_os_version" -ge 200 -a x$enable_debug != xyes
# When not building for debug, target macOS 10.14 or later, "universal"
# binaries when possible...
if echo "$CPPFLAGS $CFLAGS $LDFLAGS $OPTIM" | grep -q "\\-arch "
then :
# Don't add architecture/min-version flags if they are already present
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
elif echo "$CPPFLAGS $CFLAGS $LDFLAGS $OPTIM" | grep -q "\\-mmacosx-version-"
then :
# Don't add architecture/min-version flags if they are already present
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
elif test "$host_os_version" -ge 200 -a x$enable_debug != xyes
then :
# macOS 11.0 and higher support the Apple Silicon (arm64) CPUs
# macOS 11.0 and higher support the Apple Silicon (arm64) CPUs
OPTIM="$OPTIM -mmacosx-version-min=10.14 -arch x86_64 -arch arm64"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -mmacosx-version-min=10.14 -arch x86_64 -arch arm64" >&5
printf "%s\n" "-mmacosx-version-min=10.14 -arch x86_64 -arch arm64" >&6; }
elif test x$enable_debug != xyes
then :
OPTIM="$OPTIM -mmacosx-version-min=10.14 -arch x86_64"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -mmacosx-version-min=10.14 -arch x86_64" >&5
printf "%s\n" "-mmacosx-version-min=10.14 -arch x86_64" >&6; }
else $as_nop
# Don't add architecture/min-version flags if debug enabled
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
fi
;; #(
*) :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
;; #(
*) :
;;
esac
Expand Down
43 changes: 36 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ AS_IF([test x$enable_libpam != xno], [
dnl Extra compiler options...
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [turn on debugging, default=no]))
AC_ARG_ENABLE([maintainer], AS_HELP_STRING([--enable-maintainer], [turn on maintainer mode, default=no]))
AC_ARG_ENABLE([sanitizer], AS_HELP_STRING([--enable-sanitizer], [build with AddressSanitizer, default=no]))
AC_ARG_WITH([sanitizer], AS_HELP_STRING([--with-sanitizer], [build with address, leak, memory, thread, or undefined sanitizer, default=no]))
AS_IF([test "x$with_sanitizer" = x], [
with_sanitizer="address"
], [test "$with_sanitizer" != address -a "$with_sanitizer" != leak -a "$with_sanitizer" != memory -a "$with_sanitizer" != no -a "$with_sanitizer" != thread -a "$with_sanitizer" != undefined], [
AC_MSG_ERROR([Unsupported --with-sanitizer value "$with_sanitizer" specified.])
])

AS_IF([test x$enable_debug = xyes], [
OPTIM="$OPTIM -g"
Expand All @@ -186,13 +191,15 @@ WARNINGS=""
AC_SUBST([WARNINGS])

AS_IF([test -n "$GCC"], [
AS_IF([test x$enable_sanitizer = xyes], [
# Use -fsanitize=address with debugging...
OPTIM="$OPTIM -fsanitize=address"
AS_IF([test x$with_sanitizer != xno], [
# Use -fsanitize=FOO with debugging...
OPTIM="$OPTIM -fsanitize=$with_sanitizer"
], [echo "$CPPFLAGS $CFLAGS" | grep -q _FORTIFY_SOURCE], [
# Don't add _FORTIFY_SOURCE if it is already there
], [
# Otherwise use the Fortify enhancements to catch any unbounded
# string operations...
CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=3"
])
dnl Show all standard warnings + unused variables when compiling...
Expand Down Expand Up @@ -246,15 +253,37 @@ AS_IF([test -n "$GCC"], [
CFLAGS="$OLDCFLAGS"
dnl OS-specific compiler options...
AC_MSG_CHECKING([for OS-specific compiler options])
AS_CASE(["$host_os_name"], [linux*], [
# Make sure we get the full set of Linux APIs from the headers...
CPPFLAGS="$CPPFLAGS -D__USE_MISC -D_GNU_SOURCE"
# Mark read-only sections as relocatable to random addresses...
LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now"
AC_MSG_RESULT([-D__USE_MISC -D_GNU_SOURCE -Wl,-z,relro,-z,now])
], [darwin*], [
AS_IF([test "$host_os_version" -ge 200 -a x$enable_debug != xyes], [
# macOS 11.0 and higher support the Apple Silicon (arm64) CPUs
# When not building for debug, target macOS 10.14 or later, "universal"
# binaries when possible...
AS_IF([echo "$CPPFLAGS $CFLAGS $LDFLAGS $OPTIM" | grep -q "\\-arch "], [
# Don't add architecture/min-version flags if they are already present
AC_MSG_RESULT([none])
], [echo "$CPPFLAGS $CFLAGS $LDFLAGS $OPTIM" | grep -q "\\-mmacosx-version-"], [
# Don't add architecture/min-version flags if they are already present
AC_MSG_RESULT([none])
], [test "$host_os_version" -ge 200 -a x$enable_debug != xyes], [
# macOS 11.0 and higher support the Apple Silicon (arm64) CPUs
OPTIM="$OPTIM -mmacosx-version-min=10.14 -arch x86_64 -arch arm64"
AC_MSG_RESULT([-mmacosx-version-min=10.14 -arch x86_64 -arch arm64])
], [test x$enable_debug != xyes], [
OPTIM="$OPTIM -mmacosx-version-min=10.14 -arch x86_64"
AC_MSG_RESULT([-mmacosx-version-min=10.14 -arch x86_64])
], [
# Don't add architecture/min-version flags if debug enabled
AC_MSG_RESULT([none])
])
], [*], [
AC_MSG_RESULT([none])
])
])

Expand Down
2 changes: 1 addition & 1 deletion libcups
Submodule libcups updated 64 files
+24 −3 .github/workflows/build.yml
+5 −0 .gitignore
+12 −1 CHANGES.md
+0 −8 Makedefs.in
+12 −1 Makefile
+1 −1 config.h.in
+73 −88 configure
+45 −28 configure.ac
+56 −2 cups/Dependencies
+74 −5 cups/Makefile
+2 −2 cups/cups-private.h
+156 −113 cups/cups.h
+140 −183 cups/debug.c
+343 −0 cups/form.c
+29 −0 cups/form.h
+3 −3 cups/globals.c
+227 −344 cups/hash.c
+13 −6 cups/http-support.c
+14 −2 cups/http.h
+29 −0 cups/json-private.h
+720 −441 cups/json.c
+7 −6 cups/json.h
+1,883 −0 cups/jwt.c
+94 −0 cups/jwt.h
+48 −5 cups/libcups3.def
+87 −88 cups/md5.c
+10 −8 cups/pwg-media.c
+5 −1 cups/request.c
+209 −262 cups/string.c
+948 −72 cups/testcreds.c
+340 −0 cups/testform.c
+174 −0 cups/testhash.c
+1 −1 cups/testhttp.c
+43 −11 cups/testjson.c
+313 −0 cups/testjwt.c
+120 −518 cups/testpwg.c
+1,129 −775 cups/tls-gnutls.c
+1,139 −619 cups/tls-openssl.c
+584 −24 cups/tls.c
+88 −613 cups/tlscheck.c
+8 −1 doc/Makefile
+ doc/cupspm.epub
+994 −32 doc/cupspm.html
+7 −0 examples/Makefile
+4 −4 man/Makefile
+43 −6 scripts/makesrcdist
+4 −5 tools/Makefile
+19 −9 tools/ippeveprinter.c
+28 −4 tools/ipptool.c
+2 −2 vcnet/config.h
+3 −0 vcnet/libcups3.vcxproj
+2 −2 vcnet/libcups3_native.nuspec
+1 −1 vcnet/libcups3_native.redist.nuspec
+2 −2 xcode/config.h
+412 −2 xcode/libcups.xcodeproj/project.pbxproj
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/fuzzipp.xcscheme
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/ippevepcl.xcscheme
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/ippeveps.xcscheme
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/libcups.xcscheme
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/testcreds.xcscheme
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/testlang.xcscheme
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/testpwg.xcscheme
+1 −1 xcode/libcups.xcodeproj/xcshareddata/xcschemes/testtestpage.xcscheme

0 comments on commit d8cb62a

Please sign in to comment.