[vlc-commits] Move common predefined macros to config.h and common.am
Rémi Denis-Courmont
git at videolan.org
Mon May 2 10:57:50 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 2 10:42:14 2011 +0300| [7af4b7fed74f000a0145547a301d67314df977d3] | committer: Rémi Denis-Courmont
Move common predefined macros to config.h and common.am
Also, __USE_UNIX98 is a libc-internal definition. The build system is
not supposed to define that directly (we have _GNU_SOURCE).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7af4b7fed74f000a0145547a301d67314df977d3
---
configure.ac | 6 +++++-
modules/common.am | 1 +
src/check_headers | 1 +
src/vlc-plugin.pc.in | 1 -
vlc-config.in.in | 8 --------
5 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 710b889..49b83b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,11 @@ dnl Check for tools
dnl
AC_PROG_CC_C99
AC_USE_SYSTEM_EXTENSIONS
-AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to '2' to get glibc warnings.])
+AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.])
+AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
+AC_DEFINE([_REENTRANT],, [Define to expose reentrant functions.])
+AC_DEFINE([_THREAD_SAFE],, [Same as _REENTANT for some other OSes.])
+AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
AM_PROG_CC_C_O
AC_PROG_CXX
diff --git a/modules/common.am b/modules/common.am
index 1092b62..fc29eae 100644
--- a/modules/common.am
+++ b/modules/common.am
@@ -13,6 +13,7 @@ CLEANFILES = $(BUILT_SOURCES)
LTLIBVLCCORE = $(top_builddir)/src/libvlccore.la
+AM_CPPFLAGS = -D__PLUGIN__
AM_CFLAGS = `$(VLC_CONFIG) --cflags plugin $@`
AM_CXXFLAGS = `$(VLC_CONFIG) --cxxflags plugin $@`
AM_OBJCFLAGS = `$(VLC_CONFIG) --objcflags plugin $@`
diff --git a/src/check_headers b/src/check_headers
index 0e13920..2167f80 100755
--- a/src/check_headers
+++ b/src/check_headers
@@ -8,6 +8,7 @@ cd "$(dirname "$0")" || exit $?
regexp="$(cat ../config.h.in | \
sed -n -e 's/^#undef \([A-Z0-9_]*\)$/\1/p' | \
grep -v 'WORDS_BIGENDIAN' | \
+ grep -v '__LIBVLC__' | \
xargs | \
sed -e 's/ /\\\(\\s\\\|$\\\)\\\| /g')"
regexp=" $regexp\$"
diff --git a/src/vlc-plugin.pc.in b/src/vlc-plugin.pc.in
index 14da0a9..c7e2aff 100644
--- a/src/vlc-plugin.pc.in
+++ b/src/vlc-plugin.pc.in
@@ -10,7 +10,6 @@ Version: @VERSION@
Cflags: -I${includedir} -I${pkgincludedir}/plugins \
-D__PLUGIN__ \
-D_FILE_OFFSET_BITS=64 \
- -D__USE_UNIX98 \
@DEFS_BIGENDIAN@ \
-D_REENTRANT \
-D_THREAD_SAFE
diff --git a/vlc-config.in.in b/vlc-config.in.in
index 2b649c8..502b61f 100644
--- a/vlc-config.in.in
+++ b/vlc-config.in.in
@@ -36,7 +36,6 @@ Options:
[--objcflags] output Objective C compilation flags
Modules:
vlc the main VLC object
- plugin flags for plugin modules
MODULE any available module (dummy, gtk, avi, etc.)
libs flags for external libs
BLAH
@@ -66,11 +65,6 @@ cppflags="${includes}"
module=""
#
-# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
-#
-cppflags="${cppflags} -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE"
-
-#
# Various additional defines
#
if [ "${optim}" = speed ]; then
@@ -151,11 +145,9 @@ while test $# -gt 0; do
usage 1 1>&1
;;
libvlccore)
- cppflags="${cppflags} -D__LIBVLC__ -I${top_builddir}src/misc"
;;
plugin)
echo_plugin=yes
- cppflags="${cppflags} -D__LIBVLC__ -D__PLUGIN__"
;;
*)
module="$tgt"
More information about the vlc-commits
mailing list