]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-libtool.m4
Update libtool support to include --mode=foo stuff - surprise, libtool changed in
[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
29 LIBCUPS="libcups.la"
a621d151 30 LIBCUPSCGI="libcupscgi.la"
ef416fc2 31 LIBCUPSIMAGE="libcupsimage.la"
a621d151
MS
32 LIBCUPSMIME="libcupsmime.la"
33 LIBCUPSPPDC="libcupsppdc.la"
34
35 LIBTOOL_COMPILE="\$(LIBTOOL) --mode=compile"
36
ef416fc2 37 LINKCUPS="../cups/\$(LIBCUPS)"
38 LINKCUPSIMAGE="../filter/\$(LIBCUPSIMAGE)"
a621d151
MS
39
40 DSO="\$(LIBTOOL) --mode=link ${CC}"
41 LD_CC="\$(LIBTOOL) --mode=link ${CC}"
42 LD_CXX="\$(LIBTOOL) --mode=link ${CXX}"
43else
44 LIBTOOL_COMPILE=""
45 LD_CC="\$(CC)"
46 LD_CC="\$(CXX)"
ef416fc2 47fi
a621d151
MS
48
49AC_SUBST(LIBTOOL)
50AC_SUBST(LIBTOOL_COMPILE)
51AC_SUBST(LD_CC)
52AC_SUBST(LD_CXX)