]>
Commit | Line | Data |
---|---|---|
74456259 | 1 | dnl |
753453e4 | 2 | dnl "$Id: cups-sharedlibs.m4,v 1.6.2.1 2001/12/26 16:52:11 mike Exp $" |
74456259 | 3 | dnl |
4 | dnl Shared library support for the Common UNIX Printing System (CUPS). | |
5 | dnl | |
6 | dnl Copyright 1997-2001 by Easy Software Products, all rights reserved. | |
7 | dnl | |
8 | dnl These coded instructions, statements, and computer programs are the | |
9 | dnl property of Easy Software Products and are protected by Federal | |
10 | dnl copyright law. Distribution and use rights are outlined in the file | |
11 | dnl "LICENSE.txt" which should have been included with this file. If this | |
12 | dnl file is missing or damaged please contact Easy Software Products | |
13 | dnl at: | |
14 | dnl | |
15 | dnl Attn: CUPS Licensing Information | |
16 | dnl Easy Software Products | |
17 | dnl 44141 Airport View Drive, Suite 204 | |
18 | dnl Hollywood, Maryland 20636-3111 USA | |
19 | dnl | |
20 | dnl Voice: (301) 373-9603 | |
21 | dnl EMail: cups-info@cups.org | |
22 | dnl WWW: http://www.cups.org | |
23 | dnl | |
24 | ||
25 | PICFLAG=1 | |
26 | DSOFLAGS="${DSOFLAGS:=}" | |
27 | ||
28 | AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=yes]]) | |
29 | ||
30 | if test x$enable_shared != xno; then | |
31 | case "$uname" in | |
32 | SunOS* | UNIX_S*) | |
753453e4 | 33 | LIBCUPS="libcups.so.3" |
34 | LIBCUPSIMAGE="libcupsimage.so.3" | |
74456259 | 35 | DSO="\$(CC)" |
36 | DSOFLAGS="$DSOFLAGS -Wl,-h,\$@ -G \$(OPTIM)" | |
37 | ;; | |
38 | HP-UX*) | |
753453e4 | 39 | LIBCUPS="libcups.sl.3" |
40 | LIBCUPSIMAGE="libcupsimage.sl.3" | |
74456259 | 41 | DSO="ld" |
42 | DSOFLAGS="$DSOFLAGS -b -z +h \$@" | |
43 | ;; | |
44 | OSF1* | Linux* | IRIX* | FreeBSD* | NetBSD* | OpenBSD*) | |
753453e4 | 45 | LIBCUPS="libcups.so.3" |
46 | LIBCUPSIMAGE="libcupsimage.so.3" | |
74456259 | 47 | DSO="\$(CC)" |
48 | DSOFLAGS="$DSOFLAGS -Wl,-soname,\$@ -shared \$(OPTIM)" | |
49 | ;; | |
50 | Darwin*) | |
753453e4 | 51 | LIBCUPS="libcups.3.dylib" |
52 | LIBCUPSIMAGE="libcupsimage.3.dylib" | |
74456259 | 53 | DSO="ld" |
54 | DSOFLAGS="$DSOFLAGS -dylib /usr/lib/dylib1.o -lc" | |
55 | ;; | |
56 | AIX*) | |
57 | LIBCUPS="libcups_s.a" | |
58 | LIBCUPSIMAGE="libcupsimage_s.a" | |
59 | DSO="\$(CC)" | |
60 | DSOFLAGS="$DSOFLAGS -Wl,-bexpall,-bM:SRE,-bnoentry" | |
61 | ;; | |
62 | *) | |
63 | echo "Warning: shared libraries may not be supported. Trying -shared" | |
64 | echo " option with compiler." | |
753453e4 | 65 | LIBCUPS="libcups.so.3" |
66 | LIBCUPSIMAGE="libcupsimage.so.3" | |
74456259 | 67 | DSO="\$(CC)" |
68 | DSOFLAGS="$DSOFLAGS -Wl,-soname,\$@ -shared \$(OPTIM)" | |
69 | ;; | |
70 | esac | |
71 | else | |
72 | PICFLAG=0 | |
73 | LIBCUPS="libcups.a" | |
74 | LIBCUPSIMAGE="libcupsimage.a" | |
75 | DSO=":" | |
76 | fi | |
77 | ||
78 | AC_SUBST(DSO) | |
79 | AC_SUBST(DSOFLAGS) | |
80 | AC_SUBST(LIBCUPS) | |
81 | AC_SUBST(LIBCUPSIMAGE) | |
82 | ||
83 | if test x$enable_shared = xno; then | |
84 | LINKCUPS="-L../cups -lcups" | |
85 | LINKCUPSIMAGE="-L../filter -lcupsimage" | |
86 | LINKCUPS="$LINKCUPS \$(SSLLIBS)" | |
87 | else | |
88 | if test $uname = AIX; then | |
89 | ||
90 | LINKCUPS="-L../cups -lcups_s" | |
91 | LINKCUPSIMAGE="-L../filter -lcupsimage_s" | |
92 | else | |
93 | LINKCUPS="-L../cups -lcups" | |
94 | LINKCUPSIMAGE="-L../filter -lcupsimage" | |
95 | fi | |
96 | fi | |
97 | ||
98 | AC_SUBST(LINKCUPS) | |
99 | AC_SUBST(LINKCUPSIMAGE) | |
100 | ||
101 | dnl Update libraries for DSOs... | |
102 | if test "$DSO" != ":"; then | |
103 | # When using DSOs the image libraries are linked to libcupsimage.so | |
104 | # rather than to the executables. This makes things smaller if you | |
105 | # are using any static libraries, and it also allows us to distribute | |
106 | # a single DSO rather than a bunch... | |
107 | DSOLIBS="\$(LIBPNG) \$(LIBTIFF) \$(LIBJPEG) \$(LIBZ)" | |
108 | IMGLIBS="" | |
109 | ||
110 | # The *BSD, HP-UX, and Solaris run-time linkers need help when | |
111 | # deciding where to find a DSO. Add linker options to tell them | |
112 | # where to find the DSO (usually in /usr/lib... duh!) | |
113 | case $uname in | |
114 | HP-UX*) | |
115 | # HP-UX | |
116 | DSOFLAGS="+b $libdir +fb $DSOFLAGS" | |
117 | LDFLAGS="$LDFLAGS -Wl,+b,$libdir,+fb" | |
118 | ;; | |
119 | SunOS*) | |
120 | # Solaris | |
121 | DSOFLAGS="-R$libdir $DSOFLAGS" | |
122 | LDFLAGS="$LDFLAGS -R$libdir" | |
123 | ;; | |
124 | FreeBSD* | NetBSD* | OpenBSD*) | |
125 | # *BSD | |
126 | DSOFLAGS="-Wl,-R$libdir $DSOFLAGS" | |
127 | LDFLAGS="$LDFLAGS -Wl,-R$libdir" | |
128 | ;; | |
129 | Linux*) | |
130 | # Linux | |
131 | DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS" | |
132 | LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir" | |
133 | ;; | |
134 | esac | |
135 | else | |
136 | DSOLIBS="" | |
137 | IMGLIBS="\$(LIBPNG) \$(LIBTIFF) \$(LIBJPEG) \$(LIBZ)" | |
138 | fi | |
139 | ||
140 | AC_SUBST(DSOLIBS) | |
141 | AC_SUBST(IMGLIBS) | |
142 | ||
143 | dnl | |
753453e4 | 144 | dnl End of "$Id: cups-sharedlibs.m4,v 1.6.2.1 2001/12/26 16:52:11 mike Exp $". |
74456259 | 145 | dnl |