Mercurial > audlegacy-plugins
annotate m4/buildsys.m4 @ 3059:2e241e90494a
Import work in progress xmms-crossfade rewrite.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Fri, 24 Apr 2009 05:57:35 -0500 |
parents | f17af872dee0 |
children |
rev | line source |
---|---|
1763 | 1 dnl |
2978
a68a51138f4d
Updated buildsys.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2378
diff
changeset
|
2 dnl Copyright (c) 2007 - 2008, Jonathan Schleifer <js-buildsys@webkeks.org> |
1763 | 3 dnl |
2378
e7d59a6ed443
Added HG repo URL to buildsys as a comment.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2147
diff
changeset
|
4 dnl https://webkeks.org/hg/buildsys/ |
e7d59a6ed443
Added HG repo URL to buildsys as a comment.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2147
diff
changeset
|
5 dnl |
1763 | 6 dnl Permission to use, copy, modify, and/or distribute this software for any |
7 dnl purpose with or without fee is hereby granted, provided that the above | |
8 dnl copyright notice and this permission notice is present in all copies. | |
9 dnl | |
10 dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
11 dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
12 dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
13 dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | |
14 dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
15 dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
16 dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
17 dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
18 dnl CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
19 dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
20 dnl POSSIBILITY OF SUCH DAMAGE. | |
21 dnl | |
22 | |
1909 | 23 AC_DEFUN([BUILDSYS_PROG_IMPLIB], [ |
2034
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
1909
diff
changeset
|
24 AC_MSG_CHECKING(whether we need an implib) |
1909 | 25 case "$target" in |
26 *-*-cygwin | *-*-mingw32) | |
27 AC_MSG_RESULT(yes) | |
28 PROG_IMPLIB_NEEDED='yes' | |
29 PROG_IMPLIB_LDFLAGS='-Wl,-export-all-symbols,--out-implib,lib${PROG}.a' | |
30 ;; | |
31 *) | |
32 AC_MSG_RESULT(no) | |
33 PROG_IMPLIB_NEEDED='no' | |
34 PROG_IMPLIB_LDFLAGS='' | |
35 ;; | |
36 esac | |
37 | |
38 AC_SUBST(PROG_IMPLIB_NEEDED) | |
39 AC_SUBST(PROG_IMPLIB_LDFLAGS) | |
40 ]) | |
41 | |
1879
81cdc01db60e
Update buildsys (adds ${PROG_SUFFIX}).
Jonathan Schleifer <js@h3c.de>
parents:
1864
diff
changeset
|
42 AC_DEFUN([BUILDSYS_SHARED_LIB], [ |
1763 | 43 AC_MSG_CHECKING(for shared library system) |
44 case "$target" in | |
45 intel-apple-*) | |
46 AC_MSG_RESULT([Mac OS X (Intel)]) | |
47 LIB_CPPFLAGS='-DPIC' | |
48 LIB_CFLAGS='-fPIC' | |
49 LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB}' | |
50 LIB_PREFIX='lib' | |
51 LIB_SUFFIX='.dylib' | |
52 PLUGIN_CPPFLAGS='' | |
53 PLUGIN_CFLAGS='' | |
54 PLUGIN_LDFLAGS='-bundle -fno-common -flat_namespace -undefined suppress' | |
55 PLUGIN_SUFFIX='.impl' | |
56 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' | |
57 UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' | |
58 CLEAN_LIB='' | |
59 ;; | |
60 *-apple-*) | |
61 AC_MSG_RESULT(Mac OS X) | |
62 LIB_CPPFLAGS='-DPIC' | |
63 LIB_CFLAGS='' | |
64 LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB}' | |
65 LIB_PREFIX='lib' | |
66 LIB_SUFFIX='.dylib' | |
67 PLUGIN_CPPFLAGS='' | |
68 PLUGIN_CFLAGS='' | |
69 PLUGIN_LDFLAGS='-bundle -fno-common -flat_namespace -undefined suppress' | |
70 PLUGIN_SUFFIX='.impl' | |
71 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' | |
72 UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' | |
73 CLEAN_LIB='' | |
74 ;; | |
1864 | 75 *-*-solaris* | *-openbsd-* | *-mirbsd-*) |
1763 | 76 AC_MSG_RESULT(Solaris) |
77 LIB_CPPFLAGS='-DPIC' | |
78 LIB_CFLAGS='-fPIC' | |
79 LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}' | |
80 LIB_PREFIX='lib' | |
81 LIB_SUFFIX='.so' | |
82 PLUGIN_CPPFLAGS='-DPIC' | |
83 PLUGIN_CFLAGS='-fPIC' | |
84 PLUGIN_LDFLAGS='-shared -fPIC' | |
85 PLUGIN_SUFFIX='.so' | |
1864 | 86 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' |
1763 | 87 UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}' |
88 CLEAN_LIB='' | |
89 ;; | |
1880 | 90 *-*-cygwin | *-*-mingw32) |
1864 | 91 AC_MSG_RESULT(Win32) |
1763 | 92 LIB_CPPFLAGS='-DPIC' |
93 LIB_CFLAGS='' | |
94 LIB_LDFLAGS='-shared -Wl,--out-implib,${LIB}.a' | |
95 LIB_PREFIX='lib' | |
96 LIB_SUFFIX='.dll' | |
97 PLUGIN_CPPFLAGS='' | |
98 PLUGIN_CFLAGS='' | |
1864 | 99 PLUGIN_LDFLAGS='-shared' |
1763 | 100 PLUGIN_SUFFIX='.dll' |
101 INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a' | |
102 UNINSTALL_LIB='rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a' | |
103 CLEAN_LIB='${LIB}.a' | |
104 ;; | |
105 *) | |
2978
a68a51138f4d
Updated buildsys.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2378
diff
changeset
|
106 AC_MSG_RESULT(GNU) |
1763 | 107 LIB_CPPFLAGS='-DPIC' |
108 LIB_CFLAGS='-fPIC' | |
2378
e7d59a6ed443
Added HG repo URL to buildsys as a comment.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2147
diff
changeset
|
109 LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}' |
1763 | 110 LIB_PREFIX='lib' |
111 LIB_SUFFIX='.so' | |
112 PLUGIN_CPPFLAGS='-DPIC' | |
113 PLUGIN_CFLAGS='-fPIC' | |
114 PLUGIN_LDFLAGS='-shared -fPIC' | |
115 PLUGIN_SUFFIX='.so' | |
116 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' | |
117 UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0' | |
118 CLEAN_LIB='' | |
119 ;; | |
120 esac | |
121 | |
122 AC_SUBST(LIB_CPPFLAGS) | |
123 AC_SUBST(LIB_CFLAGS) | |
124 AC_SUBST(LIB_LDFLAGS) | |
125 AC_SUBST(LIB_PREFIX) | |
126 AC_SUBST(LIB_SUFFIX) | |
127 AC_SUBST(PLUGIN_CPPFLAGS) | |
128 AC_SUBST(PLUGIN_CFLAGS) | |
129 AC_SUBST(PLUGIN_LDFLAGS) | |
130 AC_SUBST(PLUGIN_SUFFIX) | |
131 AC_SUBST(INSTALL_LIB) | |
132 AC_SUBST(UNINSTALL_LIB) | |
133 AC_SUBST(CLEAN_LIB) | |
134 ]) | |
2978
a68a51138f4d
Updated buildsys.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2378
diff
changeset
|
135 |
a68a51138f4d
Updated buildsys.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2378
diff
changeset
|
136 AC_DEFUN([BUILDSYS_TOUCH_DEPS], [ |
2981
f17af872dee0
It seems that $as_echo is undefined on some systems. Fixed.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2980
diff
changeset
|
137 ${as_echo:="echo"} "${as_me:="configure"}: Touching .deps files" |
2978
a68a51138f4d
Updated buildsys.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2378
diff
changeset
|
138 for i in $(find . -name Makefile); do |
2980
a73d4c88a6f3
Touch .deps files in the past so they are always recreated.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2978
diff
changeset
|
139 touch -t 0001010000 $(dirname $i)/.deps |
2978
a68a51138f4d
Updated buildsys.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2378
diff
changeset
|
140 done |
a68a51138f4d
Updated buildsys.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2378
diff
changeset
|
141 ]) |