comparison m4/ltoptions.m4 @ 1826:6a621a625b04

New release
author Adam Chlipala <adam@chlipala.net>
date Tue, 25 Sep 2012 08:16:58 -0400
parents 252e05bf199d
children
comparison
equal deleted inserted replaced
1825:52c291b05738 1826:6a621a625b04
1 # Helper functions for option handling. -*- Autoconf -*- 1 # Helper functions for option handling. -*- Autoconf -*-
2 # 2 #
3 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 3 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
4 # Inc.
5 # Written by Gary V. Vaughan, 2004 4 # Written by Gary V. Vaughan, 2004
6 # 5 #
7 # This file is free software; the Free Software Foundation gives 6 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without 7 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved. 8 # modifications, as long as this notice is preserved.
10 9
11 # serial 7 ltoptions.m4 10 # serial 6 ltoptions.m4
12 11
13 # This is to help aclocal find these macros, as it can't see m4_define. 12 # This is to help aclocal find these macros, as it can't see m4_define.
14 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
15 14
16 15
124 # Declare package support for building win32 dll's. 123 # Declare package support for building win32 dll's.
125 LT_OPTION_DEFINE([LT_INIT], [win32-dll], 124 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
126 [enable_win32_dll=yes 125 [enable_win32_dll=yes
127 126
128 case $host in 127 case $host in
129 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 128 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
130 AC_CHECK_TOOL(AS, as, false) 129 AC_CHECK_TOOL(AS, as, false)
131 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
132 AC_CHECK_TOOL(OBJDUMP, objdump, false) 131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
133 ;; 132 ;;
134 esac 133 esac
135 134
136 test -z "$AS" && AS=as 135 test -z "$AS" && AS=as
137 _LT_DECL([], [AS], [1], [Assembler program])dnl 136 _LT_DECL([], [AS], [0], [Assembler program])dnl
138 137
139 test -z "$DLLTOOL" && DLLTOOL=dlltool 138 test -z "$DLLTOOL" && DLLTOOL=dlltool
140 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 139 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
141 140
142 test -z "$OBJDUMP" && OBJDUMP=objdump 141 test -z "$OBJDUMP" && OBJDUMP=objdump
143 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 142 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
144 ])# win32-dll 143 ])# win32-dll
145 144
146 AU_DEFUN([AC_LIBTOOL_WIN32_DLL], 145 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
147 [AC_REQUIRE([AC_CANONICAL_HOST])dnl 146 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
148 _LT_SET_OPTION([LT_INIT], [win32-dll]) 147 _LT_SET_OPTION([LT_INIT], [win32-dll])
324 # implement the --with-pic flag, and support the `pic-only' and `no-pic' 323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
325 # LT_INIT options. 324 # LT_INIT options.
326 # MODE is either `yes' or `no'. If omitted, it defaults to `both'. 325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
327 m4_define([_LT_WITH_PIC], 326 m4_define([_LT_WITH_PIC],
328 [AC_ARG_WITH([pic], 327 [AC_ARG_WITH([pic],
329 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 328 [AS_HELP_STRING([--with-pic],
330 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
331 [lt_p=${PACKAGE-default} 330 [pic_mode="$withval"],
332 case $withval in
333 yes|no) pic_mode=$withval ;;
334 *)
335 pic_mode=default
336 # Look at the argument we got. We use all the common list separators.
337 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
338 for lt_pkg in $withval; do
339 IFS="$lt_save_ifs"
340 if test "X$lt_pkg" = "X$lt_p"; then
341 pic_mode=yes
342 fi
343 done
344 IFS="$lt_save_ifs"
345 ;;
346 esac],
347 [pic_mode=default]) 331 [pic_mode=default])
348 332
349 test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 333 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
350 334
351 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 335 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl