Commit 163b655b authored by Sam Hocevar's avatar Sam Hocevar

* m4/vlc.m4 configure.ac:

    + Moved the shared object suffix detection to vlc.m4.
    + Replaced AX_* macros with VLC_* macros.
parent dbca5ca7
$Id: HACKING,v 1.10 2003/07/07 17:01:16 sam Exp $
$Id$
Hacking vlc
===========
......@@ -66,6 +66,6 @@ To add a module to the repository, just add its sources to a Modules.am
file. If you create a new Modules.am, do not forget to add a corresponding
Makefile line at the end of configure.ac.
To have the module built, you need to add a call to AX_ADD_PLUGINS or
AX_ADD_BUILTINS to configure.ac with your new module name as argument.
To have the module built, you need to add a call to VLC_ADD_PLUGINS or
VLC_ADD_BUILTINS to configure.ac with your new module name as argument.
......@@ -133,20 +133,20 @@ fi
rm -f m4/private.m4-tmp1 && cat > m4/private.m4-tmp1 << EOF
dnl The required AM_CONDITIONAL calls
dnl XXX: too many conditionals make the build very slow, disabled them
AC_DEFUN([AX_VLC_CONDITIONALS], [
AC_DEFUN([VLC_CONDITIONALS], [
EOF
rm -f m4/private.m4-tmp2 && cat > m4/private.m4-tmp2 << EOF
dnl The required AC_SUBST calls
AC_DEFUN([AX_VLC_SUBSTS], [
AC_DEFUN([VLC_SUBSTS], [
EOF
rm -f m4/private.m4-tmp3 && cat > m4/private.m4-tmp3 << EOF
dnl The required AC_OUTPUT calls
dnl XXX: this feature is only supported starting from automake-1.7
AC_DEFUN([AX_VLC_MAKEFILES], [AC_OUTPUT([
AC_DEFUN([VLC_MAKEFILES], [AC_OUTPUT([
EOF
rm -f m4/private.m4-tmp4 && cat > m4/private.m4-tmp4 << EOF
dnl Helper macro for vlc-config generation
AC_DEFUN([AX_VLC_CONFIG_HELPER], [
AC_DEFUN([VLC_CONFIG_HELPER], [
cat >> vlc-config.in << BLAH
EOF
......
This diff is collapsed.
dnl Macros needed for VLC
dnl $Id: vlc.m4,v 1.6 2003/07/17 15:49:37 sam Exp $
dnl $Id$
dnl Add plugins or builtins
AC_DEFUN([AX_ADD_BUILTINS], [
dnl ===========================================================================
dnl Macros to add plugins or builtins and handle their flags
AC_DEFUN([VLC_ADD_BUILTINS], [
BUILTINS="${BUILTINS} $1"
])
AC_DEFUN([AX_ADD_PLUGINS], [
AC_DEFUN([VLC_ADD_PLUGINS], [
PLUGINS="${PLUGINS} $1"
])
dnl Save and restore default flags
AC_DEFUN([AX_SAVE_FLAGS], [
CPPFLAGS_save="${CPPFLAGS}"
CFLAGS_save="${CFLAGS}"
CXXFLAGS_save="${CXXFLAGS}"
OBJCFLAGS_save="${OBJCFLAGS}"
LDFLAGS_save="${LDFLAGS}"
])
AC_DEFUN([AX_RESTORE_FLAGS], [
CPPFLAGS="${CPPFLAGS_save}"
CFLAGS="${CFLAGS_save}"
CXXFLAGS="${CXXFLAGS_save}"
OBJCFLAGS="${OBJCFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
])
dnl Special cases: vlc, pics, plugins, save
AC_DEFUN([AX_ADD_CPPFLAGS], [
AC_DEFUN([VLC_ADD_CPPFLAGS], [
for element in [$1]; do
eval "CPPFLAGS_${element}="'"$'"{CPPFLAGS_${element}} $2"'"'
am_modules_with_cppflags="${am_modules_with_cppflags} ${element}"
done
])
AC_DEFUN([AX_ADD_CFLAGS], [
AC_DEFUN([VLC_ADD_CFLAGS], [
for element in [$1]; do
eval "CFLAGS_${element}="'"$'"{CFLAGS_${element}} $2"'"'
am_modules_with_cflags="${am_modules_with_cflags} ${element}"
done
])
AC_DEFUN([AX_ADD_CXXFLAGS], [
AC_DEFUN([VLC_ADD_CXXFLAGS], [
for element in [$1]; do
eval "CXXFLAGS_${element}="'"$'"{CXXFLAGS_${element}} $2"'"'
am_modules_with_cxxflags="${am_modules_with_cxxflags} ${element}"
done
])
AC_DEFUN([AX_ADD_OBJCFLAGS], [
AC_DEFUN([VLC_ADD_OBJCFLAGS], [
for element in [$1]; do
eval "OBJCFLAGS_${element}="'"$'"{OBJCFLAGS_${element}} $2"'"'
am_modules_with_objcflags="${am_modules_with_objcflags} ${element}"
done
])
AC_DEFUN([AX_ADD_LDFLAGS], [
AC_DEFUN([VLC_ADD_LDFLAGS], [
for element in [$1]; do
eval "LDFLAGS_${element}="'"'"$2 "'$'"{LDFLAGS_${element}} "'"'
am_modules_with_ldflags="${am_modules_with_ldflags} ${element}"
done
])
AC_DEFUN([AX_OUTPUT_VLC_CONFIG_IN], [
dnl ===========================================================================
dnl Macros to save and restore default flags
AC_DEFUN([VLC_SAVE_FLAGS], [
CPPFLAGS_save="${CPPFLAGS}"
CFLAGS_save="${CFLAGS}"
CXXFLAGS_save="${CXXFLAGS}"
OBJCFLAGS_save="${OBJCFLAGS}"
LDFLAGS_save="${LDFLAGS}"
])
AC_DEFUN([VLC_RESTORE_FLAGS], [
CPPFLAGS="${CPPFLAGS_save}"
CFLAGS="${CFLAGS_save}"
CXXFLAGS="${CXXFLAGS_save}"
OBJCFLAGS="${OBJCFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
])
dnl ===========================================================================
dnl Helper macro to generate the vlc-config.in file
AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [
AC_MSG_RESULT(configure: creating ./vlc-config.in)
......@@ -116,10 +123,33 @@ AC_DEFUN([AX_OUTPUT_VLC_CONFIG_IN], [
sed -ne '/#@1@#/,/#@2@#/p' < "${srcdir}/vlc-config.in.in" \
| sed -e '/#@.@#/d' >> vlc-config.in
AX_VLC_CONFIG_HELPER
VLC_CONFIG_HELPER
dnl '/#@2@#/,${/#@.@#/d;p}' won't work on OS X
sed -ne '/#@2@#/,$p' < "${srcdir}/vlc-config.in.in" \
| sed -e '/#@.@#/d' >> vlc-config.in
])
dnl ===========================================================================
dnl Macros for shared object handling (TODO)
AC_DEFUN([VLC_LIBRARY_SUFFIX], [
AC_MSG_CHECKING(for shared objects suffix)
case "${target_os}" in
darwin*)
LIBEXT=".dylib"
;;
*mingw32* | *cygwin*)
LIBEXT=".dll"
;;
hpux*)
LIBEXT=".sl"
;;
*)
LIBEXT=".so"
;;
esac
AC_MSG_RESULT(${LIBEXT})
AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
])
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