summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-17 00:54:43 +0000
committerDavid Robillard <d@drobilla.net>2012-05-17 00:54:43 +0000
commit86474713798d6fb40c161ae4b319ffa73472d3c1 (patch)
treee2fb5a26a37a9493c3762f3a41c09a606527365c /libs
parent8aca90e593aae691fcc6f115e28cb7552ce0fb31 (diff)
Fix posix_memalign checks.
git-svn-id: svn://localhost/ardour2/branches/3.0@12316 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/macosx/ardour.xcodeproj/project.pbxproj2
-rw-r--r--libs/pbd/fpu.cc2
-rw-r--r--libs/pbd/malign.cc2
-rw-r--r--libs/pbd/wscript3
4 files changed, 3 insertions, 6 deletions
diff --git a/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj b/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj
index 8786691730..e9708cbefa 100644
--- a/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj
+++ b/libs/ardour/macosx/ardour.xcodeproj/project.pbxproj
@@ -1061,7 +1061,6 @@
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)",
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)",
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)",
- NO_POSIX_MEMALIGN,
);
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\"";
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\"";
@@ -1110,7 +1109,6 @@
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_3)",
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_4)",
"$(GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_5)",
- NO_POSIX_MEMALIGN,
);
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_1 = "PACKAGE=\"\\\"libardour\\\"\"";
GCC_PREPROCESSOR_DEFINITIONS_QUOTED_FOR_PROJECT_2 = "CONFIG_DIR=\"\\\"/Library/Application\\ Support/Ardour/config\\\"\"";
diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc
index 479c422c37..94b741fd73 100644
--- a/libs/pbd/fpu.cc
+++ b/libs/pbd/fpu.cc
@@ -80,7 +80,7 @@ FPU::FPU ()
supported, otherwise, it isn't.
*/
-#ifdef NO_POSIX_MEMALIGN
+#ifndef HAVE_POSIX_MEMALIGN
fxbuf = (char **) malloc (sizeof (char *));
assert (fxbuf);
*fxbuf = (char *) malloc (512);
diff --git a/libs/pbd/malign.cc b/libs/pbd/malign.cc
index b8aa61c997..44361aa70a 100644
--- a/libs/pbd/malign.cc
+++ b/libs/pbd/malign.cc
@@ -18,7 +18,7 @@ static const int CPU_CACHE_ALIGN = 16; /* arguably 32 on most arches, but it mat
int cache_aligned_malloc (void** memptr, size_t size)
{
-#ifdef NO_POSIX_MEMALIGN
+#ifndef HAVE_POSIX_MEMALIGN
if (((*memptr) = malloc (size)) == 0) {
fatal << string_compose (_("Memory allocation error: malloc (%1 * %2) failed (%3)"),
CPU_CACHE_ALIGN, size, strerror (errno)) << endmsg;
diff --git a/libs/pbd/wscript b/libs/pbd/wscript
index 35e54a53b6..8e3b435d7d 100644
--- a/libs/pbd/wscript
+++ b/libs/pbd/wscript
@@ -43,8 +43,7 @@ def configure(conf):
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT',mandatory=False)
conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO',mandatory=False)
conf.check(header_name='unistd.h', define_name='HAVE_UNISTD',mandatory=False)
- if conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600',mandatory=False) == False:
- conf.define ('NO_POSIX_MEMALIGN',1)
+ conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600', define_name='HAVE_POSIX_MEMALIGN', mandatory=False)
conf.write_config_header('libpbd-config.h', remove=False)