forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ams-2.1.2-fix-build-system.patch
127 lines (117 loc) · 3.77 KB
/
ams-2.1.2-fix-build-system.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
* Remove extraneous CXXFLAGS
* Missing -ldl for dlsym, dlerror, and dlopen
See also:
https://bugs.gentoo.org/show_bug.cgi?id=379251
https://bugs.gentoo.org/show_bug.cgi?id=600642
--- a/configure.ac
+++ b/configure.ac
@@ -3,9 +3,9 @@
AC_PREREQ(2.61)
AC_INIT(ams, [2.1.2], [[email protected]])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_CONFIG_SRCDIR([src/box.h])
-AC_CONFIG_HEADER([src/config.h])
+AC_CONFIG_HEADERS([src/config.h])
AM_INIT_AUTOMAKE([dist-bzip2])
# Checks for programs.
@@ -31,46 +31,7 @@
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STAT
-dnl set basic compiler flags
-AMS_CORE_CXXFLAGS="-Wall"
-
-dnl set compiler optimization flags
-AC_MSG_CHECKING(which processor class to optimize for)
-case "$target" in
- i486-*-*)
- AMS_OPT_CXXFLAGS="-march=i486"
- AC_MSG_RESULT(i486)
- ;;
- i586-*-*)
- AMS_OPT_CXXFLAGS="-march=pentium"
- AC_MSG_RESULT(i586)
- ;;
- i686-*-*)
- AMS_OPT_CXXFLAGS="-march=pentiumpro -msse -mfpmath=sse -ffast-math"
- AC_MSG_RESULT(i686)
- ;;
- i786-*-*)
- AMS_OPT_CXXFLAGS="-march=pentium4 -msse -mfpmath=sse -ffast-math"
- AC_MSG_RESULT(i786)
- ;;
- x86_64-*-*)
- AMS_OPT_CXXFLAGS="-m64 -msse -mfpmath=sse -ffast-math"
- AC_MSG_RESULT(x86_64)
- ;;
- *)
- AC_MSG_RESULT(i386)
- AC_MSG_WARN(This is probably not what you want, use --target)
- ;;
-esac
-
-if test "x$AMS_OPT_CXXFLAGS" = "x"; then
- AMS_CXXFLAGS=$AMS_CORE_CXXFLAGS
-else
- AC_MSG_NOTICE([Compiler optimization... $AMS_OPT_CXXFLAGS])
- AMS_CXXFLAGS="$AMS_CORE_CXXFLAGS $AMS_OPT_CXXFLAGS"
-fi
-AC_SUBST(AMS_CXXFLAGS)
-
+CXXFLAGS="${CXXFLAGS} -Wall"
# Checks for libraries.
AC_CHECK_LIB([asound], [snd_pcm_open], ,
@@ -81,8 +42,12 @@
[AC_MSG_ERROR(pthread is required)])
AC_CHECK_LIB([m], [roundf], ,
[AC_MSG_ERROR([required libm missing])])
-AC_CHECK_LIB([dl], [dlopen], ,
- [AC_MSG_ERROR(libdl is required)])
+dnl The dlopen() function is in the C library for *BSD and in
+dnl libdl on GLIBC-based systems
+AC_SEARCH_LIBS([dlopen], [dl dld], [], [
+ AC_MSG_ERROR([unable to find the dlopen() function])
+])
+
dnl for vocoder module
AC_CHECK_LIB([fftw3], [fftw_execute], ,
[AC_MSG_ERROR(libfftw3 is required)])
@@ -111,7 +76,7 @@
fi
dnl option to enable Qt5 instead of default Qt4 library
-AC_ARG_ENABLE(qt5, AC_HELP_STRING([--enable-qt5],
+AC_ARG_ENABLE(qt5, AS_HELP_STRING([--enable-qt5],
[enable Qt5 instead of Qt4 library]),,
enable_qt4=yes)
AS_IF([test x$enable_qt4 = xyes],
@@ -215,7 +180,7 @@
# Check for ladspa plugins path
AC_ARG_WITH(ladspa-path,
- [AC_HELP_STRING([--with-ladspa-path=DIR],
+ [AS_HELP_STRING([--with-ladspa-path=DIR],
[directory for ladspa plugins])],
[ if test "x$withval" != "x" ; then
LADSPA_PATH="$withval"
@@ -250,14 +215,6 @@
if test "$have_liblo" = "yes"; then
AC_DEFINE(NSM_SUPPORT, 1,
[Define to enable NSM support])
- LIBSsave=$LIBS
- CFLAGSsave=$CFLAGS
- CFLAGS=$LIBLO_CFLAGS
- LIBS=$LIBLO_LIBS
- AC_SUBST(LIBLO_CFLAGS)
- AC_SUBST(LIBLO_LIBS)
- LIBS+=$LIBSsave
- CFLAGS+=$CFLAGSsave
fi
fi
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -267,7 +267,7 @@
# all generated files to be removed by "make clean"
CLEANFILES = $(nodist_ams_SOURCES) $(translations_DATA)
-ams_CXXFLAGS = $(QT_CXXFLAGS) $(AMS_CXXFLAGS)
+ams_CXXFLAGS = $(QT_CXXFLAGS)
DEFS = -D_REENTRANT -DLADSPA_PATH=\"$(LADSPA_PATH)\" -DTRANSLATIONSDIR=\"$(translationsdir)\" -DDEMOFILEPATH=\"$(pkgdatadir)/demos\" -DINSTRUMENTFILEPATH=\"$(pkgdatadir)/instruments\" @DEFS@
# rule for moc-file generation