diff options
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | Makefile.am | 17 | ||||
-rw-r--r-- | acinclude.m4 | 6 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rwxr-xr-x | configure2 | 2 |
5 files changed, 38 insertions, 5 deletions
@@ -31,6 +31,7 @@ | |||
31 | # Deps & libs | 31 | # Deps & libs |
32 | .deps | 32 | .deps |
33 | .libs | 33 | .libs |
34 | *.def | ||
34 | 35 | ||
35 | # http://www.gnu.org/software/automake | 36 | # http://www.gnu.org/software/automake |
36 | 37 | ||
@@ -56,4 +57,8 @@ Makefile | |||
56 | /config.log | 57 | /config.log |
57 | /config.status | 58 | /config.status |
58 | /libtool | 59 | /libtool |
59 | /ltmain.sh \ No newline at end of file | 60 | /ltmain.sh |
61 | |||
62 | # configure2-generated | ||
63 | |||
64 | config.mak \ No newline at end of file | ||
diff --git a/Makefile.am b/Makefile.am index 1c8ce13..0a6605a 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -2,5 +2,18 @@ ACLOCAL_AMFLAGS = -I m4 | |||
2 | 2 | ||
3 | lib_LTLIBRARIES = libdl.la | 3 | lib_LTLIBRARIES = libdl.la |
4 | libdl_la_SOURCES = dlfcn.c | 4 | libdl_la_SOURCES = dlfcn.c |
5 | libdl_la_LDFLAGS = -no-undefined | 5 | # Don't build libdl as libdl-0.dll |
6 | include_HEADERS = dlfcn.h \ No newline at end of file | 6 | libdl_la_LDFLAGS = -avoid-version -no-undefined @GEN_DEF@ |
7 | include_HEADERS = dlfcn.h | ||
8 | |||
9 | $(lib_LTLIBRARIES): @LIBDL_MSVC_LIB@ | ||
10 | |||
11 | libdl.lib: | ||
12 | $(MSVCLIB) -def:libdl.def -out:libdl.lib | ||
13 | |||
14 | install-exec:: @EXTRA_INSTALL@ | ||
15 | |||
16 | install-msvc-lib: | ||
17 | mkdir -p "$(DESTDIR)$(libdir)" | ||
18 | @echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libdir)'" | ||
19 | $(INSTALL_DATA) libdl.lib "$(DESTDIR)$(libdir)" | ||
diff --git a/acinclude.m4 b/acinclude.m4 index 352fbdd..57a1c98 100644 --- a/acinclude.m4 +++ b/acinclude.m4 | |||
@@ -28,6 +28,7 @@ | |||
28 | # - MINGW_AC_MSVC_IMPORT_LIBS: | 28 | # - MINGW_AC_MSVC_IMPORT_LIBS: |
29 | # - Renamed the option to --enable-msvc for compatibility with the old | 29 | # - Renamed the option to --enable-msvc for compatibility with the old |
30 | # configure script. | 30 | # configure script. |
31 | # - Error if shared lib is not enabled. | ||
31 | # - Cosmetics: | 32 | # - Cosmetics: |
32 | # - Use '' instead of `' | 33 | # - Use '' instead of `' |
33 | 34 | ||
@@ -48,7 +49,10 @@ AC_DEFUN([MINGW_AC_MSVC_IMPORT_LIBS], | |||
48 | [enable building of MSVC compatible import libraries]),[], | 49 | [enable building of MSVC compatible import libraries]),[], |
49 | [enable_msvc=no]) | 50 | [enable_msvc=no]) |
50 | AC_CHECK_TOOL([MSVCLIB], [lib]) | 51 | AC_CHECK_TOOL([MSVCLIB], [lib]) |
51 | if test "x$enable_msvc" = xyes && test -n "$MSVCLIB" | 52 | |
53 | if test "x$enable_msvc" = xyes && test "x$enable_shared" != xyes | ||
54 | then AC_MSG_ERROR([MSVC import lib requested but shared lib not enabled.]) | ||
55 | elif test "x$enable_msvc" = xyes && test -n "$MSVCLIB" | ||
52 | then $1="$2" | 56 | then $1="$2" |
53 | elif test "x$enable_msvc" = xyes | 57 | elif test "x$enable_msvc" = xyes |
54 | then AC_MSG_WARN([no MSVC compatible 'lib' program found in \$PATH | 58 | then AC_MSG_WARN([no MSVC compatible 'lib' program found in \$PATH |
diff --git a/configure.ac b/configure.ac index c9596bd..60baafd 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -9,6 +9,8 @@ AC_CANONICAL_BUILD | |||
9 | AM_INIT_AUTOMAKE([foreign]) | 9 | AM_INIT_AUTOMAKE([foreign]) |
10 | LT_INIT | 10 | LT_INIT |
11 | 11 | ||
12 | # Set the flags here to make libtool catch the flags | ||
13 | CFLAGS='-Wall -O3 -fomit-frame-pointer' | ||
12 | AC_PROG_CC | 14 | AC_PROG_CC |
13 | 15 | ||
14 | AC_MSG_CHECKING([windows.h and win32 API]) | 16 | AC_MSG_CHECKING([windows.h and win32 API]) |
@@ -26,6 +28,15 @@ AC_LINK_IFELSE([ | |||
26 | ]) | 28 | ]) |
27 | 29 | ||
28 | MINGW_AC_MSVC_IMPORT_LIBS([LIBDL_MSVC_LIB], [libdl.lib]) | 30 | MINGW_AC_MSVC_IMPORT_LIBS([LIBDL_MSVC_LIB], [libdl.lib]) |
31 | AC_SUBST([LIBDL_MSVC_LIB]) | ||
32 | |||
33 | test -n "${LIBDL_MSVC_LIB}" && \ | ||
34 | GEN_DEF="-Wl,--output-def,libdl.def" && \ | ||
35 | EXTRA_INSTALL="install-msvc-lib" | ||
36 | AC_SUBST([GEN_DEF]) | ||
37 | AC_SUBST([EXTRA_INSTALL]) | ||
38 | |||
39 | test -n | ||
29 | 40 | ||
30 | AC_CONFIG_FILES(Makefile) | 41 | AC_CONFIG_FILES(Makefile) |
31 | AC_OUTPUT \ No newline at end of file | 42 | AC_OUTPUT \ No newline at end of file |
@@ -232,4 +232,4 @@ if enabled shared; then | |||
232 | fi | 232 | fi |
233 | echo "wine: $wine $winecmd" | 233 | echo "wine: $wine $winecmd" |
234 | 234 | ||
235 | echo "Run `make -f Makefile2` to build." \ No newline at end of file | 235 | echo "Run \`make -f Makefile2\` to build." \ No newline at end of file |