1dnl
2dnl Libtool stuff for CUPS.
3dnl
4dnl Copyright 2007-2018 by Apple Inc.
5dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
6dnl
7dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8dnl
9
10AC_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
24if 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="../cups/\$(LIBCUPSIMAGE)"
44
45else
46	LD_CC="\$(CC)"
47	LD_CXX="\$(CXX)"
48
49	LIBTOOL_CC=""
50	LIBTOOL_CXX=""
51	LIBTOOL_INSTALL=""
52fi
53
54AC_SUBST(LD_CC)
55AC_SUBST(LD_CXX)
56
57AC_SUBST(LIBTOOL)
58AC_SUBST(LIBTOOL_CC)
59AC_SUBST(LIBTOOL_CXX)
60AC_SUBST(LIBTOOL_INSTALL)
61