]> git.sesse.net Git - vlc/blobdiff - configure.ac
More UTF8ication
[vlc] / configure.ac
index 7cf3dfa44b2a4bcc34b866d6ac6ac089b2d894a0..3d53621162d57eefb4575bcde8dd9330958681d1 100644 (file)
@@ -20,6 +20,15 @@ dnl them. And we need the comma otherwize automake will choke on it.
 AM_INIT_AUTOMAKE(vlc,0.8.5-svn)
 AM_CONFIG_HEADER(config.h)
 
+dnl Too many people are not aware of maintainer mode:
+dnl If you want to use it, you definitely know what you are doing, so
+dnl you can specify "--disable-maintainer-mode". But if you want the default
+dnl automake behavior, you've likely never heard of maintainer mode, so we
+dnl can't expect you to enable it manually.
+
+AS_IF([test "x${enable_maintainer_mode}" != "xno"],
+       [enable_maintainer_mode="yes"])
+
 dnl HA! HA!
 AM_MAINTAINER_MODE
 
@@ -87,8 +96,6 @@ AC_ARG_WITH(contrib,
 
   if test -d ${topdir}/extras/contrib/lib; then
     export PATH=${topdir}/extras/contrib/bin:$PATH
-dnl kludge because only the debian package provides a ffmpeg-config
-    with_ffmpeg_config_path=${topdir}/extras/contrib/bin       
     CPPFLAGS="${CPPFLAGS} -I${topdir}/extras/contrib/include"
     CPPFLAGS_save="${CPPFLAGS_save} -I${topdir}/extras/contrib/include"
     CFLAGS="${CFLAGS} -I${topdir}/extras/contrib/include"
@@ -97,7 +104,7 @@ dnl kludge because only the debian package provides a ffmpeg-config
     CXXFLAGS_save="${CXXFLAGS_save} -I${topdir}/extras/contrib/include"
     OBJCFLAGS="${OBJCFLAGS} -I${topdir}/extras/contrib/include"
     OBJCFLAGS_save="${OBJCFLAGS_save} -I${topdir}/extras/contrib/include"
-    if test $build = $host; then
+    if test $build = $host -o $PKG_CONFIG_LIBDIR; then
        export PKG_CONFIG_PATH=${topdir}/extras/contrib/lib/pkgconfig:$PKG_CONFIG_PATH
     else
        export PKG_CONFIG_LIBDIR=${topdir}/extras/contrib/lib/pkgconfig
@@ -108,8 +115,18 @@ dnl kludge because only the debian package provides a ffmpeg-config
     fi
     LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/lib"
     LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/lib"
-    with_livedotcom_tree=${topdir}/extras/contrib/src/live
-    with_goom_tree=${topdir}/extras/contrib/src/goom
+
+dnl kludge because only the debian package provides a ffmpeg-config
+    if test -z $with_ffmpeg_config_path; then 
+       with_ffmpeg_config_path=${topdir}/extras/contrib/bin;
+    fi
+    if test -z $with_livedotcom_tree; then
+       with_livedotcom_tree=${topdir}/extras/contrib/src/live
+    fi
+    if test -z $with_goom_tree; then
+      with_goom_tree=${topdir}/extras/contrib/src/goom
+    fi
+
     if test ".`uname -s`" = ".Darwin"; then
       export LD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$LD_LIBRARY_PATH
       export DYLD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$DYLD_LIBRARY_PATH
@@ -365,7 +382,7 @@ CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcd
 dnl Check for system libs needed
 need_libc=false
 
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch)
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol strtof strtoll strtoull strsep isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r localtime_r lrintf daemon scandir fork bsearch assert)
 
 dnl Check for usual libc functions
 AC_CHECK_FUNCS(strdup strndup atof)
@@ -1335,6 +1352,9 @@ dnl
 AC_ARG_ENABLE(debug,
 [  --enable-debug          debug mode (default disabled)])
 test "${enable_debug}" != "yes" && enable_debug="no"
+AH_TEMPLATE(NDEBUG,
+            [Define to 1 if debug code should NOT be compiled])
+AS_IF([test "x${enable_debug}" == "xno"], [AC_DEFINE(NDEBUG)])
 
 dnl
 dnl  Enable release-specific flags