]> git.ipfire.org Git - thirdparty/cups.git/blob - config-scripts/cups-libtool.m4
License change: Apache License, Version 2.0.
[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 Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8 dnl
9
10 AC_ARG_ENABLE(libtool_unsupported, [ --enable-libtool-unsupported=/path/to/libtool
11 build with libtool (UNSUPPORTED!)],
12 [if test x$enable_libtool_unsupported != xno; then
13 if test x$enable_libtool_unsupported == xyes; then
14 AC_MSG_ERROR([Use --enable-libtool-unsupported=/path/to/libtool.])
15 fi
16 LIBTOOL="$enable_libtool_unsupported"
17 enable_shared=no
18 echo "WARNING: libtool is not supported or endorsed by Apple Inc."
19 echo " WE DO NOT PROVIDE SUPPORT FOR LIBTOOL PROBLEMS."
20 else
21 LIBTOOL=""
22 fi])
23
24 if test x$LIBTOOL != x; then
25 DSO="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
26 DSOXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
27
28 LD_CC="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
29 LD_CXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
30
31 LIBCUPS="libcups.la"
32 LIBCUPSSTATIC="libcups.la"
33 LIBCUPSCGI="libcupscgi.la"
34 LIBCUPSIMAGE="libcupsimage.la"
35 LIBCUPSMIME="libcupsmime.la"
36 LIBCUPSPPDC="libcupsppdc.la"
37
38 LIBTOOL_CC="\$(LIBTOOL) --mode=compile --tag=CC"
39 LIBTOOL_CXX="\$(LIBTOOL) --mode=compile --tag=CXX"
40 LIBTOOL_INSTALL="\$(LIBTOOL) --mode=install"
41
42 LINKCUPS="../cups/\$(LIBCUPS)"
43 LINKCUPSIMAGE="../filter/\$(LIBCUPSIMAGE)"
44
45 else
46 LD_CC="\$(CC)"
47 LD_CXX="\$(CXX)"
48
49 LIBTOOL_CC=""
50 LIBTOOL_CXX=""
51 LIBTOOL_INSTALL=""
52 fi
53
54 AC_SUBST(LD_CC)
55 AC_SUBST(LD_CXX)
56
57 AC_SUBST(LIBTOOL)
58 AC_SUBST(LIBTOOL_CC)
59 AC_SUBST(LIBTOOL_CXX)
60 AC_SUBST(LIBTOOL_INSTALL)