aboutsummaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2014-09-13 17:01:43 -0700
committerTimothy Gu <timothygu99@gmail.com>2014-09-13 17:03:07 -0700
commit2d6c00722652589b6c2532d9e9a43417d29612c1 (patch)
tree04bd767f7fb6de394a21d60d5d487ac41b5af2a3 /acinclude.m4
parentcf56306383935c6123f1ab70fcb73c850e301819 (diff)
downloaddlfcn-win32-2d6c00722652589b6c2532d9e9a43417d29612c1.tar.gz
dlfcn-win32-2d6c00722652589b6c2532d9e9a43417d29612c1.tar.bz2
dlfcn-win32-2d6c00722652589b6c2532d9e9a43417d29612c1.zip
Add autotools build system
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m468
1 files changed, 68 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..352fbdd
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,68 @@
1# MSVC-compatibe import lib generation recipe
2#
3# Copyright (C) 2007, MinGW Project
4# Written by Keith Marshall <keithmarshall@users.sourceforge.net>
5#
6#
7# This is free software. It is provided AS IS, in the hope that it may
8# be useful, but WITHOUT WARRANTY OF ANY KIND, not even an IMPLIED WARRANTY
9# of MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE.
10#
11# Permission is granted to redistribute this software, either "as is" or
12# in modified form, under the terms of the GNU Lesser General Public License,
13# as published by the Free Software Foundation; either version 2.1, or (at
14# your option) any later version.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with this software; see the file COPYING. If not, write to the
18# Free Software Foundation, 51 Franklin St - Fifth Floor, Boston,
19# MA 02110-1301, USA.
20
21# Copied from http://sourceforge.net/p/mingw/regex/ci/e7b1d8be1cd5dcf0c654228c2af30fd769cac61d/tree/aclocal.m4
22#
23# Modifications:
24# - License header:
25# - Short description of file added
26# - Changed 'see the file COPYING.lib' to 'see the file COPYING'
27# - Removed all macros besides MINGW_AC_MSVC_IMPORT_LIBS
28# - MINGW_AC_MSVC_IMPORT_LIBS:
29# - Renamed the option to --enable-msvc for compatibility with the old
30# configure script.
31# - Cosmetics:
32# - Use '' instead of `'
33
34# MINGW_AC_MSVC_IMPORT_LIBS( VARNAME, TARGET )
35# --------------------------------------------
36# Check for the availability of the MSVC 'lib' program.
37# If it is found in $PATH, and the user has requested '--enable-msvc',
38# then set the AC_SUBST variable VARNAME to TARGET, otherwise set VARNAME to
39# the null string.
40#
41# If the user has requested '--enable-msvc', but MSVC 'lib' cannot be
42# found, then 'configure' will print a warning; this will be suppressed, if
43# '--enable-msvc' has not been requested.
44#
45AC_DEFUN([MINGW_AC_MSVC_IMPORT_LIBS],
46[AC_ARG_ENABLE([msvc],
47 AS_HELP_STRING([--enable-msvc],
48 [enable building of MSVC compatible import libraries]),[],
49 [enable_msvc=no])
50 AC_CHECK_TOOL([MSVCLIB], [lib])
51 if test "x$enable_msvc" = xyes && test -n "$MSVCLIB"
52 then $1="$2"
53 elif test "x$enable_msvc" = xyes
54 then AC_MSG_WARN([no MSVC compatible 'lib' program found in \$PATH
55
56 The MSVC 'lib' program is required to build MSVC compatible import libs.
57 Since this program does not appear to be installed on this computer, MSVC
58 compatible import libs will not be built; configuration will continue, but
59 only MinGW format import libs will be included in the resultant build.
60
61 If you wish to build a development kit which does include import libs for
62 MSVC, in addition to those for MinGW, you should ensure that MSVC has been
63 installed on this computer, and that \$PATH includes the directory in which
64 its 'lib' program is located, then run 'configure' again.
65 ])
66 fi
67 AC_SUBST([$1])dnl
68])# MINGW_AC_MSVC_IMPORT_LIBS