xref: /aosp_15_r20/external/libcups/config-scripts/cups-libtool.m4 (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Workerdnl
2*5e7646d2SAndroid Build Coastguard Workerdnl Libtool stuff for CUPS.
3*5e7646d2SAndroid Build Coastguard Workerdnl
4*5e7646d2SAndroid Build Coastguard Workerdnl Copyright 2007-2018 by Apple Inc.
5*5e7646d2SAndroid Build Coastguard Workerdnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
6*5e7646d2SAndroid Build Coastguard Workerdnl
7*5e7646d2SAndroid Build Coastguard Workerdnl Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8*5e7646d2SAndroid Build Coastguard Workerdnl
9*5e7646d2SAndroid Build Coastguard Worker
10*5e7646d2SAndroid Build Coastguard WorkerAC_ARG_ENABLE(libtool_unsupported, [  --enable-libtool-unsupported=/path/to/libtool
11*5e7646d2SAndroid Build Coastguard Worker                          build with libtool (UNSUPPORTED!)],
12*5e7646d2SAndroid Build Coastguard Worker	[if test x$enable_libtool_unsupported != xno; then
13*5e7646d2SAndroid Build Coastguard Worker		if test x$enable_libtool_unsupported == xyes; then
14*5e7646d2SAndroid Build Coastguard Worker			AC_MSG_ERROR([Use --enable-libtool-unsupported=/path/to/libtool.])
15*5e7646d2SAndroid Build Coastguard Worker		fi
16*5e7646d2SAndroid Build Coastguard Worker		LIBTOOL="$enable_libtool_unsupported"
17*5e7646d2SAndroid Build Coastguard Worker		enable_shared=no
18*5e7646d2SAndroid Build Coastguard Worker		echo "WARNING: libtool is not supported or endorsed by Apple Inc."
19*5e7646d2SAndroid Build Coastguard Worker		echo "         WE DO NOT PROVIDE SUPPORT FOR LIBTOOL PROBLEMS."
20*5e7646d2SAndroid Build Coastguard Worker	else
21*5e7646d2SAndroid Build Coastguard Worker		LIBTOOL=""
22*5e7646d2SAndroid Build Coastguard Worker	fi])
23*5e7646d2SAndroid Build Coastguard Worker
24*5e7646d2SAndroid Build Coastguard Workerif test x$LIBTOOL != x; then
25*5e7646d2SAndroid Build Coastguard Worker	DSO="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
26*5e7646d2SAndroid Build Coastguard Worker	DSOXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
27*5e7646d2SAndroid Build Coastguard Worker
28*5e7646d2SAndroid Build Coastguard Worker	LD_CC="\$(LIBTOOL) --mode=link --tag=CC ${CC}"
29*5e7646d2SAndroid Build Coastguard Worker	LD_CXX="\$(LIBTOOL) --mode=link --tag=CXX ${CXX}"
30*5e7646d2SAndroid Build Coastguard Worker
31*5e7646d2SAndroid Build Coastguard Worker	LIBCUPS="libcups.la"
32*5e7646d2SAndroid Build Coastguard Worker	LIBCUPSSTATIC="libcups.la"
33*5e7646d2SAndroid Build Coastguard Worker	LIBCUPSCGI="libcupscgi.la"
34*5e7646d2SAndroid Build Coastguard Worker	LIBCUPSIMAGE="libcupsimage.la"
35*5e7646d2SAndroid Build Coastguard Worker	LIBCUPSMIME="libcupsmime.la"
36*5e7646d2SAndroid Build Coastguard Worker	LIBCUPSPPDC="libcupsppdc.la"
37*5e7646d2SAndroid Build Coastguard Worker
38*5e7646d2SAndroid Build Coastguard Worker	LIBTOOL_CC="\$(LIBTOOL) --mode=compile --tag=CC"
39*5e7646d2SAndroid Build Coastguard Worker	LIBTOOL_CXX="\$(LIBTOOL) --mode=compile --tag=CXX"
40*5e7646d2SAndroid Build Coastguard Worker	LIBTOOL_INSTALL="\$(LIBTOOL) --mode=install"
41*5e7646d2SAndroid Build Coastguard Worker
42*5e7646d2SAndroid Build Coastguard Worker	LINKCUPS="../cups/\$(LIBCUPS)"
43*5e7646d2SAndroid Build Coastguard Worker	LINKCUPSIMAGE="../cups/\$(LIBCUPSIMAGE)"
44*5e7646d2SAndroid Build Coastguard Worker
45*5e7646d2SAndroid Build Coastguard Workerelse
46*5e7646d2SAndroid Build Coastguard Worker	LD_CC="\$(CC)"
47*5e7646d2SAndroid Build Coastguard Worker	LD_CXX="\$(CXX)"
48*5e7646d2SAndroid Build Coastguard Worker
49*5e7646d2SAndroid Build Coastguard Worker	LIBTOOL_CC=""
50*5e7646d2SAndroid Build Coastguard Worker	LIBTOOL_CXX=""
51*5e7646d2SAndroid Build Coastguard Worker	LIBTOOL_INSTALL=""
52*5e7646d2SAndroid Build Coastguard Workerfi
53*5e7646d2SAndroid Build Coastguard Worker
54*5e7646d2SAndroid Build Coastguard WorkerAC_SUBST(LD_CC)
55*5e7646d2SAndroid Build Coastguard WorkerAC_SUBST(LD_CXX)
56*5e7646d2SAndroid Build Coastguard Worker
57*5e7646d2SAndroid Build Coastguard WorkerAC_SUBST(LIBTOOL)
58*5e7646d2SAndroid Build Coastguard WorkerAC_SUBST(LIBTOOL_CC)
59*5e7646d2SAndroid Build Coastguard WorkerAC_SUBST(LIBTOOL_CXX)
60*5e7646d2SAndroid Build Coastguard WorkerAC_SUBST(LIBTOOL_INSTALL)
61