Mercurial > audlegacy
annotate m4/buildsys.m4 @ 4271:90282d9e4bec
fix after merge...
author | Eugene Zagidullin <e.asphyx@gmail.com> |
---|---|
date | Sun, 10 Feb 2008 16:13:30 +0300 |
parents | b5c8a7e2215d |
children | 3e0a2cce15f6 |
rev | line source |
---|---|
3535 | 1 dnl |
3877 | 2 dnl Copyright (c) 2007, Jonathan Schleifer <js-buildsys@webkeks.org> |
3535 | 3 dnl |
4 dnl Permission to use, copy, modify, and/or distribute this software for any | |
5 dnl purpose with or without fee is hereby granted, provided that the above | |
6 dnl copyright notice and this permission notice is present in all copies. | |
7 dnl | |
8 dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
9 dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
10 dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
11 dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | |
12 dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
13 dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
14 dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
15 dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
16 dnl CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
17 dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
18 dnl POSSIBILITY OF SUCH DAMAGE. | |
19 dnl | |
20 | |
3656
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
21 AC_DEFUN([BUILDSYS_PROG_IMPLIB], [ |
3723
d4794783f2ee
Spelling fix. Spotted by nenolod.
Eugene Paskevich <eugene@raptor.kiev.ua>
parents:
3657
diff
changeset
|
22 AC_MSG_CHECKING(whether we need an implib) |
3656
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
23 case "$target" in |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
24 *) |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
25 AC_MSG_RESULT(no) |
3657 | 26 PROG_IMPLIB_NEEDED='no' |
3656
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
27 PROG_IMPLIB_LDFLAGS='' |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
28 ;; |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
29 esac |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
30 |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
31 AC_SUBST(PROG_IMPLIB_NEEDED) |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
32 AC_SUBST(PROG_IMPLIB_LDFLAGS) |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
33 ]) |
db04d0916c22
implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents:
3653
diff
changeset
|
34 |
3641
12500701b6dd
Update buildsys (adds ${PROG_SUFFIX}).
Jonathan Schleifer <js@h3c.de>
parents:
3618
diff
changeset
|
35 AC_DEFUN([BUILDSYS_SHARED_LIB], [ |
3535 | 36 AC_MSG_CHECKING(for shared library system) |
37 case "$target" in | |
38 intel-apple-*) | |
39 AC_MSG_RESULT([Mac OS X (Intel)]) | |
40 LIB_CPPFLAGS='-DPIC' | |
41 LIB_CFLAGS='-fPIC' | |
3785 | 42 LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB} -flat_namespace -undefined suppress' |
3535 | 43 LIB_PREFIX='lib' |
44 LIB_SUFFIX='.dylib' | |
45 PLUGIN_CPPFLAGS='' | |
46 PLUGIN_CFLAGS='' | |
47 PLUGIN_LDFLAGS='-bundle -fno-common -flat_namespace -undefined suppress' | |
48 PLUGIN_SUFFIX='.impl' | |
49 INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i' | |
50 UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' | |
3594
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
51 CLEAN_LIB='' |
3535 | 52 ;; |
53 *-apple-*) | |
54 AC_MSG_RESULT(Mac OS X) | |
55 LIB_CPPFLAGS='-DPIC' | |
56 LIB_CFLAGS='' | |
3785 | 57 LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB} -flat_namespace -undefined suppress' |
3535 | 58 LIB_PREFIX='lib' |
59 LIB_SUFFIX='.dylib' | |
60 PLUGIN_CPPFLAGS='' | |
61 PLUGIN_CFLAGS='' | |
62 PLUGIN_LDFLAGS='-bundle -fno-common -flat_namespace -undefined suppress' | |
63 PLUGIN_SUFFIX='.impl' | |
64 INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i' | |
65 UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' | |
3594
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
66 CLEAN_LIB='' |
3535 | 67 ;; |
3618 | 68 *-*-solaris* | *-openbsd-* | *-mirbsd-*) |
3535 | 69 AC_MSG_RESULT(Solaris) |
70 LIB_CPPFLAGS='-DPIC' | |
71 LIB_CFLAGS='-fPIC' | |
3596 | 72 LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}' |
3535 | 73 LIB_PREFIX='lib' |
74 LIB_SUFFIX='.so' | |
75 PLUGIN_CPPFLAGS='-DPIC' | |
76 PLUGIN_CFLAGS='-fPIC' | |
77 PLUGIN_LDFLAGS='-shared -fPIC' | |
78 PLUGIN_SUFFIX='.so' | |
3618 | 79 INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i' |
3535 | 80 UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}' |
3594
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
81 CLEAN_LIB='' |
3535 | 82 ;; |
3643 | 83 *-*-cygwin | *-*-mingw32) |
3618 | 84 AC_MSG_RESULT(Win32) |
3535 | 85 LIB_CPPFLAGS='-DPIC' |
86 LIB_CFLAGS='' | |
3594
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
87 LIB_LDFLAGS='-shared -Wl,--out-implib,${LIB}.a' |
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
88 LIB_PREFIX='lib' |
3535 | 89 LIB_SUFFIX='.dll' |
90 PLUGIN_CPPFLAGS='' | |
91 PLUGIN_CFLAGS='' | |
3618 | 92 PLUGIN_LDFLAGS='-shared' |
3535 | 93 PLUGIN_SUFFIX='.dll' |
3594
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
94 INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a' |
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
95 UNINSTALL_LIB='rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a' |
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
96 CLEAN_LIB='${LIB}.a' |
3535 | 97 ;; |
98 *) | |
99 AC_MSG_RESULT(POSIX) | |
100 LIB_CPPFLAGS='-DPIC' | |
101 LIB_CFLAGS='-fPIC' | |
3831 | 102 LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}' |
3535 | 103 LIB_PREFIX='lib' |
104 LIB_SUFFIX='.so' | |
105 PLUGIN_CPPFLAGS='-DPIC' | |
106 PLUGIN_CFLAGS='-fPIC' | |
107 PLUGIN_LDFLAGS='-shared -fPIC' | |
108 PLUGIN_SUFFIX='.so' | |
3861
1902ce57b333
Fix installation of libaudid3tag in ${plugindir}.
Vitaly Lipatov <lav@etersoft.ru>
parents:
3831
diff
changeset
|
109 INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${LIBDIR}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${LIBDIR}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${LIBDIR}/$$i' |
1902ce57b333
Fix installation of libaudid3tag in ${plugindir}.
Vitaly Lipatov <lav@etersoft.ru>
parents:
3831
diff
changeset
|
110 UNINSTALL_LIB='rm -f ${DESTDIR}${LIBDIR}/$$i ${DESTDIR}${LIBDIR}/$$i.${LIB_MAJOR} ${DESTDIR}${LIBDIR}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0' |
3594
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
111 CLEAN_LIB='' |
3535 | 112 ;; |
113 esac | |
114 | |
115 AC_SUBST(LIB_CPPFLAGS) | |
116 AC_SUBST(LIB_CFLAGS) | |
117 AC_SUBST(LIB_LDFLAGS) | |
118 AC_SUBST(LIB_PREFIX) | |
119 AC_SUBST(LIB_SUFFIX) | |
120 AC_SUBST(PLUGIN_CPPFLAGS) | |
121 AC_SUBST(PLUGIN_CFLAGS) | |
122 AC_SUBST(PLUGIN_LDFLAGS) | |
123 AC_SUBST(PLUGIN_SUFFIX) | |
124 AC_SUBST(INSTALL_LIB) | |
125 AC_SUBST(UNINSTALL_LIB) | |
3594
fa49ef305f59
Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents:
3586
diff
changeset
|
126 AC_SUBST(CLEAN_LIB) |
3535 | 127 ]) |