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