]> git.ipfire.org Git - thirdparty/cups.git/blob - config-scripts/cups-libtool.m4
8e1b9c743aa89802f23bbc99731c7330599f39e1
[thirdparty/cups.git] / config-scripts / cups-libtool.m4
1 dnl
2 dnl Libtool stuff for CUPS.
3 dnl
4 dnl Copyright 2007-2017 by Apple Inc.
5 dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
6 dnl
7 dnl These coded instructions, statements, and computer programs are the
8 dnl property of Apple Inc. and are protected by Federal copyright
9 dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 dnl which should have been included with this file. If this file is
11 dnl missing or damaged, see the license at "http://www.cups.org/".
12 dnl
13
14 AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported=/path/to/libtool
15 build with libtool (UNSUPPORTED!)],
16 [if test x$enable_libtool_unsupported != xno; then
17 if test x$enable_libtool_unsupported == xyes; then
18 AC_MSG_ERROR([Use --enable-libtool-unsupported=/path/to/libtool.])
19 fi
20 LIBTOOL="$enable_libtool_unsupported"
21 enable_shared=no
22 echo "WARNING: libtool is not supported or endorsed by Apple Inc."
23 echo " WE DO NOT PROVIDE SUPPORT FOR LIBTOOL PROBLEMS."
24 else
25 LIBTOOL=""
26 fi])
27
28 if test x$LIBTOOL != x; then
29 DSO="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
30 DSOXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
31
32 LD_CC="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
33 LD_CXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
34
35 LIBCUPS="libcups.la"
36 LIBCUPSSTATIC="libcups.la"
37 LIBCUPSCGI="libcupscgi.la"
38 LIBCUPSIMAGE="libcupsimage.la"
39 LIBCUPSMIME="libcupsmime.la"
40 LIBCUPSPPDC="libcupsppdc.la"
41
42 LIBTOOL_CC="\$(LIBTOOL) --mode=compile --tag=CC"
43 LIBTOOL_CXX="\$(LIBTOOL) --mode=compile --tag=CXX"
44 LIBTOOL_INSTALL="\$(LIBTOOL) --mode=install"
45
46 LINKCUPS="../cups/\$(LIBCUPS)"
47 LINKCUPSIMAGE="../filter/\$(LIBCUPSIMAGE)"
48
49 else
50 LD_CC="\$(CC)"
51 LD_CXX="\$(CXX)"
52
53 LIBTOOL_CC=""
54 LIBTOOL_CXX=""
55 LIBTOOL_INSTALL=""
56 fi
57
58 AC_SUBST(LD_CC)
59 AC_SUBST(LD_CXX)
60
61 AC_SUBST(LIBTOOL)
62 AC_SUBST(LIBTOOL_CC)
63 AC_SUBST(LIBTOOL_CXX)
64 AC_SUBST(LIBTOOL_INSTALL)