Skip to content

Commit

Permalink
Update libtool support to include --mode=foo stuff - surprise, libtoo…
Browse files Browse the repository at this point in the history
…l changed in

incompatible ways again...  (Issue #5050)
  • Loading branch information
Michael R Sweet committed Jul 17, 2017
1 parent 3a1e6b1 commit a621d15
Show file tree
Hide file tree
Showing 18 changed files with 252 additions and 210 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CHANGES - 2.2.5 - 2017-07-07
CHANGES - 2.2.5 - 2017-07-17
============================

CHANGES IN CUPS V2.2.5
Expand All @@ -12,6 +12,8 @@ CHANGES IN CUPS V2.2.5
- The IPP backend now always sends the "finishings" attribute for printers that
support it because otherwise the client cannot override printer defaults
(rdar:https://33169732)
- The --enable-libtool configure option requires a path to the libtool program,
but doesn't document or check for it (Issue #5062)


CHANGES IN CUPS V2.2.4
Expand Down
6 changes: 4 additions & 2 deletions Makedefs.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@

AR = @AR@
AWK = @AWK@
CC = @LIBTOOL@ @CC@
CC = @LIBTOOL_COMPILE@ @CC@
CHMOD = @CHMOD@
CXX = @LIBTOOL@ @CXX@
CXX = @LIBTOOL_COMPILE@ @CXX@
DSO = @DSO@
DSOXX = @DSOXX@
GZIP = @GZIP@
INSTALL = @INSTALL@
LD = @LD@
LD_CC = @LD_CC@
LD_CXX = @LD_CXX@
LIBTOOL = @LIBTOOL@
LN = @LN@ -sf
MV = @MV@
Expand Down
32 changes: 16 additions & 16 deletions backend/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Backend makefile for CUPS.
#
# Copyright 2007-2016 by Apple Inc.
# Copyright 2007-2017 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
Expand All @@ -24,7 +24,7 @@ include ../Makedefs
# UBACKENDS and ULBACKENDS are installed mode 0755 so cupsd will run them as
# an unprivileged user...
#
# See http:https://www.cups.org/documentation.php/api-filter.html for more info...
# See http:https://www.cups.org/doc/api-filter.html for more info...
RBACKENDS = \
ipp \
lpd \
Expand Down Expand Up @@ -207,8 +207,8 @@ uninstall:

test1284: test1284.o ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/$(LIBCUPSSTATIC) \
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
$(LD_CC) $(LDFLAGS) -o test1284 test1284.o ../cups/$(LIBCUPSSTATIC) \
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LD_COMMONLIBS) $(LIBZ)


#
Expand All @@ -217,8 +217,8 @@ test1284: test1284.o ../cups/$(LIBCUPSSTATIC)

testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/$(LIBCUPSSTATIC) \
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
$(LD_CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/$(LIBCUPSSTATIC) \
$(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LD_COMMONLIBS) $(LIBZ)


#
Expand All @@ -227,9 +227,9 @@ testbackend: testbackend.o ../cups/$(LIBCUPSSTATIC)

testsupplies: testsupplies.o libbackend.a ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
$(LD_CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
$(LD_COMMONLIBS) $(LIBZ)


#
Expand All @@ -249,7 +249,7 @@ libbackend.a: $(LIBOBJS)

dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
$(LD_CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
if test `uname` = Darwin; then \
$(RM) mdns; \
$(LN) dnssd mdns; \
Expand All @@ -262,7 +262,7 @@ dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a

ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
$(LD_CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
$(RM) http
$(LN) ipp http

Expand All @@ -273,7 +273,7 @@ ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a

lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
$(LD_CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)


#
Expand All @@ -282,7 +282,7 @@ lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a

snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
$(LD_CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)


#
Expand All @@ -291,13 +291,13 @@ snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a

socket: socket.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
$(LD_CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)

socket-static: socket.o ../cups/$(LIBCUPSSTATIC) libbackend.a
echo Linking $@...
$(CC) $(LDFLAGS) -o socket-static socket.o libbackend.a \
$(LD_CC) $(LDFLAGS) -o socket-static socket.o libbackend.a \
../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \
$(COMMONLIBS) $(LIBZ)
$(LD_COMMONLIBS) $(LIBZ)


#
Expand All @@ -306,7 +306,7 @@ socket-static: socket.o ../cups/$(LIBCUPSSTATIC) libbackend.a

usb: usb.o ../cups/$(LIBCUPS) libbackend.a
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
$(BACKLIBS) $(LIBS)
usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c

Expand Down
10 changes: 5 additions & 5 deletions berkeley/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Berkeley commands makefile for CUPS.
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 2007-2017 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
Expand Down Expand Up @@ -124,7 +124,7 @@ uninstall:

lpc: lpc.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o lpc lpc.o $(LIBS)
$(LD_CC) $(LDFLAGS) -o lpc lpc.o $(LIBS)


#
Expand All @@ -133,7 +133,7 @@ lpc: lpc.o ../cups/$(LIBCUPS)

lpq: lpq.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o lpq lpq.o $(LIBS)
$(LD_CC) $(LDFLAGS) -o lpq lpq.o $(LIBS)


#
Expand All @@ -142,7 +142,7 @@ lpq: lpq.o ../cups/$(LIBCUPS)

lpr: lpr.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o lpr lpr.o $(LIBS)
$(LD_CC) $(LDFLAGS) -o lpr lpr.o $(LIBS)


#
Expand All @@ -151,7 +151,7 @@ lpr: lpr.o ../cups/$(LIBCUPS)

lprm: lprm.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o lprm lprm.o $(LIBS)
$(LD_CC) $(LDFLAGS) -o lprm lprm.o $(LIBS)


#
Expand Down
40 changes: 20 additions & 20 deletions cgi-bin/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# CGI makefile for CUPS.
#
# Copyright 2007-2016 by Apple Inc.
# Copyright 2007-2017 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
Expand Down Expand Up @@ -48,7 +48,7 @@ UNITTARGETS = \

TARGETS = \
$(LIBTARGETS) \
$(CGIS)
$(LD_CGIS)


#
Expand Down Expand Up @@ -109,12 +109,12 @@ install-data:

install-exec:
$(INSTALL_DIR) -m 755 $(SERVERBIN)/cgi-bin
for file in $(CGIS); do \
for file in $(LD_CGIS); do \
$(INSTALL_BIN) $$file $(SERVERBIN)/cgi-bin; \
done
if test "x$(SYMROOT)" != "x"; then \
$(INSTALL_DIR) $(SYMROOT); \
for file in $(CGIS); do \
for file in $(LD_CGIS); do \
cp $$file $(SYMROOT); \
dsymutil $(SYMROOT)/$$file; \
done \
Expand Down Expand Up @@ -161,15 +161,15 @@ installstatic:
$(INSTALL_DIR) -m 755 $(LIBDIR)
$(INSTALL_LIB) -m 755 libcupscgi.a $(LIBDIR)
$(RANLIB) $(LIBDIR)/libcupscgi.a
$(CHMOD) 555 $(LIBDIR)/libcupscgi.a
$(LD_CHMOD) 555 $(LIBDIR)/libcupscgi.a


#
# Uninstall all targets...
#

uninstall:
for file in $(CGIS); do \
for file in $(LD_CGIS); do \
$(RM) $(SERVERBIN)/cgi-bin/$$file; \
done
-$(RMDIR) $(SERVERBIN)/cgi-bin
Expand Down Expand Up @@ -219,7 +219,7 @@ libcupscgi.1.dylib: $(LIBOBJS) libcupscgi.exp

libcupscgi.la: $(LIBOBJS)
echo Linking $@...
$(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \
$(LD_CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \
-version-info 1:0 $(LIBS)


Expand All @@ -240,7 +240,7 @@ libcupscgi.a: $(LIBOBJS)

admin.cgi: admin.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ admin.o -lcupscgi $(LIBS)
$(LD_CC) $(LDFLAGS) -o $@ admin.o -lcupscgi $(LIBS)


#
Expand All @@ -249,7 +249,7 @@ admin.cgi: admin.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)

classes.cgi: classes.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ classes.o -lcupscgi $(LIBS)
$(LD_CC) $(LDFLAGS) -o $@ classes.o -lcupscgi $(LIBS)


#
Expand All @@ -258,7 +258,7 @@ classes.cgi: classes.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)

help.cgi: help.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ help.o -lcupscgi $(LIBS)
$(LD_CC) $(LDFLAGS) -o $@ help.o -lcupscgi $(LIBS)


#
Expand All @@ -267,7 +267,7 @@ help.cgi: help.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)

jobs.cgi: jobs.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ jobs.o -lcupscgi $(LIBS)
$(LD_CC) $(LDFLAGS) -o $@ jobs.o -lcupscgi $(LIBS)


#
Expand All @@ -276,8 +276,8 @@ jobs.cgi: jobs.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)

makedocset: makedocset.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ makedocset.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ makedocset.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(LD_COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LIBZ) $(LIBGSSAPI)


Expand All @@ -287,7 +287,7 @@ makedocset: makedocset.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)

printers.cgi: printers.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ printers.o -L. -lcupscgi $(LIBS)
$(LD_CC) $(LDFLAGS) -o $@ printers.o -L. -lcupscgi $(LIBS)


#
Expand All @@ -296,8 +296,8 @@ printers.cgi: printers.o ../Makedefs ../cups/$(LIBCUPS) $(LIBCUPSCGI)

testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcgi.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testcgi.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(LD_COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LIBZ) $(LIBGSSAPI)
echo Testing CGI API...
./testcgi
Expand All @@ -309,8 +309,8 @@ testcgi: testcgi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)

testhi: testhi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhi.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LD_CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhi.o libcupscgi.a \
../cups/$(LIBCUPSSTATIC) $(LD_COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) \
$(LIBZ) $(LIBGSSAPI)
echo Testing help index API...
./testhi
Expand All @@ -322,8 +322,8 @@ testhi: testhi.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)

testtemplate: testtemplate.o ../Makedefs libcupscgi.a ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ testtemplate.o libcupscgi.a ../cups/$(LIBCUPSSTATIC) \
$(COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) $(LIBGSSAPI)
$(LD_CC) $(LDFLAGS) -o $@ testtemplate.o libcupscgi.a ../cups/$(LIBCUPSSTATIC) \
$(LD_COMMONLIBS) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) $(LIBGSSAPI)


#
Expand Down
26 changes: 21 additions & 5 deletions config-scripts/cups-libtool.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dnl
dnl Libtool stuff for CUPS.
dnl
dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 2007-2017 by Apple Inc.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
Expand All @@ -11,7 +11,7 @@ dnl which should have been included with this file. If this file is
dnl missing or damaged, see the license at "http:https://www.cups.org/".
dnl

AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported
AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported=/path/to/libtool
build with libtool (UNSUPPORTED!)],
[if test x$enable_libtool_unsupported != xno; then
if test x$enable_libtool_unsupported == xyes; then
Expand All @@ -25,12 +25,28 @@ AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported
LIBTOOL=""
fi])

AC_SUBST(LIBTOOL)

if test x$LIBTOOL != x; then
LIBCUPS="libcups.la"
LIBCUPSCGI="libcupscgi.la"
LIBCUPSIMAGE="libcupsimage.la"
LIBCUPSMIME="libcupsmime.la"
LIBCUPSPPDC="libcupsppdc.la"

LIBTOOL_COMPILE="\$(LIBTOOL) --mode=compile"

LINKCUPS="../cups/\$(LIBCUPS)"
LINKCUPSIMAGE="../filter/\$(LIBCUPSIMAGE)"
DSO="\$(CC)"

DSO="\$(LIBTOOL) --mode=link ${CC}"
LD_CC="\$(LIBTOOL) --mode=link ${CC}"
LD_CXX="\$(LIBTOOL) --mode=link ${CXX}"
else
LIBTOOL_COMPILE=""
LD_CC="\$(CC)"
LD_CC="\$(CXX)"
fi

AC_SUBST(LIBTOOL)
AC_SUBST(LIBTOOL_COMPILE)
AC_SUBST(LD_CC)
AC_SUBST(LD_CXX)

0 comments on commit a621d15

Please sign in to comment.