Commit 7af4b7fe authored by Rémi Denis-Courmont's avatar 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).
parent c3a51903
......@@ -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
......
......@@ -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 $@`
......
......@@ -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\$"
......
......@@ -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
......
......@@ -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
......@@ -65,11 +64,6 @@ includes="${includes}"
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
#
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment