dnl Autoconf settings for vlc
-dnl $Id$
AC_INIT(vlc,0.8.5-svn)
VERSION_MAJOR="0"
AC_CHECK_TOOL(AR, ar, :)
AC_CHECK_TOOL(LD, ld, :)
-dnl Sam, if you think I didn't see that... --Meuuh
-dnl AM_PROG_LIBTOOL
-AC_PROG_INSTALL
+AC_DISABLE_STATIC
+AC_LIBTOOL_DLOPEN
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+AC_ARG_ENABLE(libtool,
+ [ --enable-libtool use libtool (default disabled, EXPERIMENTAL)],
+ [],[enable_libtool="no"])
+AM_CONDITIONAL(USE_LIBTOOL, [test "${enable_libtool}" != "no"])
dnl Check for compiler properties
AC_C_CONST
if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
INCLUDES="${INCLUDES} -I\$(top_builddir)/intl"
+ AS_IF([test "${enable_libtool}" != "no"], [
+ INCLUDED_LIBINTL="${LTLIBINTL}"
+ ],[
+ INCLUDED_LIBINTL="${LIBINTL}"
+ ])
else
VLC_ADD_LDFLAGS([vlc],[${LIBINTL}])
+ INCLUDED_LIBINTL=
fi
-AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes")
+AC_SUBST(INCLUDED_LIBINTL)
XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
dnl
[AC_MSG_ERROR([libiconv is needed for VLC to work properly])])
fi
VLC_ADD_CFLAGS([vlc],[${INCICONV}])
-VLC_ADD_LDFLAGS([vlc],[${LIBICONV}])
+AS_IF([test "${enable_libtool}" != "no"], [
+ VLC_ADD_LDFLAGS([vlc],[${LIBICONV}])
+],[
+ VLC_ADD_LDFLAGS([vlc],[${LTLIBICONV}])
+])
dnl Check for the need to include the mingwex lib for mingw32
if test "${SYS}" = "mingw32"
VLC_SYMBOL_PREFIX
AC_SUBST(SYMPREF)
+AS_IF([test "${enable_libtool}" = "no"], [
case "${SYS}" in
mingw32|cygwin)
VLC_ADD_CFLAGS([pic plugin mozilla activex],[${CFLAGS_mingw32_special}])
VLC_ADD_LDFLAGS([plugin mozilla],[-fpic -fPIC])
;;
esac
+])
dnl The -DSYS_FOO flag
CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
[ac_cv_c_dynamic_no_pic],
[CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
-if test "${ac_cv_c_dynamic_no_pic}" != "no"; then
+AS_IF([test "${enable_libtool}" = "no" && test "${ac_cv_c_dynamic_no_pic}" != "no"], [
VLC_ADD_CFLAGS([builtin],[-mdynamic-no-pic])
VLC_ADD_CFLAGS([libvlc],[-mdynamic-no-pic])
-fi
+])
dnl Check for Darwin plugin linking flags
AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error],
dnl
build_pic=no
AC_ARG_ENABLE(shared-libvlc,
- [ --enable-shared-libvlc shared libvlc (default disabled EXPERIMENTAL)],
- ,[shared_libvlc=no])
-
+ [ --enable-shared-libvlc shared libvlc (default disabled EXPERIMENTAL)])
+AS_IF([test "${enable_libtool}" != "no" && test "${enable_shared_libvlc}"], [
+ AC_MSG_ERROR([--enable-shared-libvlc and --enable-libtool are mutually exclusive])
+])
dnl
dnl Stream output
dnl
dnl Pic and shared libvlc stuff
dnl
-AM_CONDITIONAL(BUILD_SHARED, [test "${shared_libvlc}" != "no"])
-AM_CONDITIONAL(BUILD_PIC, [test "${build_pic}" = "yes" -o "${shared_libvlc}" != "no"] )
-AS_IF([test "${shared_libvlc}" != "no"], [
+AS_IF([test "x${enable_shared_libvlc}" = "x"], [enable_shared_libvlc=no])
+AM_CONDITIONAL(BUILD_SHARED, [test "${enable_shared_libvlc}" != "no"])
+AM_CONDITIONAL(BUILD_PIC, [test "${build_pic}" = "yes" -o "${enable_shared_libvlc}" != "no"] )
+AS_IF([test "${enable_shared_libvlc}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
])
pic=no
-AS_IF([test "${shared_libvlc}" != "no" -o "${build_pic}" = "yes"], [pic=pic])
+AS_IF([test "${enable_shared_libvlc}" != "no" -o "${build_pic}" = "yes"], [pic=pic])
AS_IF([test "${SYS}" = "mingw32"], [pic=no])
AS_IF([test "${pic}" = "no"], [pic=])
AC_SUBST(pic)
doc/Makefile
intl/Makefile
ipkg/Makefile
- lib/Makefile
loader/Makefile
modules/Makefile
mozilla/Makefile
dnl Shortcut to nice compile message
rm -f compile
echo '#! /bin/sh' >compile
-echo "PATH=$PATH LANG=C make \$* 2>&1| ${srcdir}/extras/make.pl" >>compile
+
+echo "PATH=$PATH LANG=C make \$* 2>&1| \\" >> compile
+echo '`sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/make.pl' >> compile
chmod a+x compile
printf "