]> git.sesse.net Git - vlc/blobdiff - configure.ac
Redo 12234; this time with (hopefully) Mac OS X support
[vlc] / configure.ac
index 3ad5d77398e764ab528e3e4df42f0225f1ecbcd5..db14769b5e01001a90e7805fc31e7425e4576910 100644 (file)
@@ -73,7 +73,11 @@ AC_C_INLINE
 dnl
 dnl  Check for the contrib directory
 dnl
-topdir="`pwd`"
+topdir="`dirname $0`"
+if test "`echo \"$topdir\" | cut -c 1`" != "/"; then
+  topdir="`pwd`/$topdir"
+fi
+
 if test -d ${topdir}/extras/contrib/lib; then
   export PATH=${topdir}/extras/contrib/bin:$PATH
   CPPFLAGS="${CPPFLAGS} -I${topdir}/extras/contrib/include"
@@ -163,6 +167,7 @@ case "${target_os}" in
         VLC_ADD_LDFLAGS([vlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
         VLC_ADD_LDFLAGS([vcdx cddax],[-lwinmm])
         VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp telnet netsync],[-lws2_32])
+        VLC_ADD_LDFLAGS([ipv4],[-liphlpapi])
     fi
     if test "${SYS}" = "mingwce"; then
         # add ws2 for closesocket, select, recv
@@ -170,7 +175,8 @@ case "${target_os}" in
         VLC_ADD_CPPFLAGS([vlc],[-Dmain(a,b)=maince(a,b)])
         VLC_ADD_LDFLAGS([vlc],[-lws2 -e WinMainCRTStartup])
         VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap http netsync],[-lws2])
-    fi
+         VLC_ADD_LDFLAGS([ipv4],[-liphlpapi])
+   fi
     ;;
   *nto*)
     SYS=nto
@@ -231,6 +237,8 @@ XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS"
 dnl
 dnl Iconv stuff
 dnl
+AS_IF([test "$am_cv_func_iconv" != "yes"],
+       [AC_MSG_ERROR([libiconv is needed for VLC to work properly])])
 VLC_ADD_CFLAGS([vlc],[${INCICONV}])
 VLC_ADD_LDFLAGS([vlc],[${LIBICONV}])
 
@@ -288,6 +296,9 @@ dnl Plugin compilation stuff
 
 VLC_LIBRARY_SUFFIX
 
+VLC_SYMBOL_PREFIX
+AC_SUBST(SYMPREF)
+
 case "${SYS}" in
   mingw32|cygwin)
     VLC_ADD_CFLAGS([pic plugin mozilla activex],[${CFLAGS_mingw32_special}])
@@ -1787,7 +1798,7 @@ then
     else
       VLC_ADD_BUILTINS([dvb])
     fi
-  ],[])
+  ],[AC_MSG_WARN(linux-dvb headers not found, dvb disabled)])
   CPPFLAGS="${CPPFLAGS_save}"
 fi
 
@@ -2016,24 +2027,27 @@ AC_ARG_ENABLE(ffmpeg,
 [  --enable-ffmpeg         ffmpeg codec (default enabled)])
 if test "${enable_ffmpeg}" != "no"
 then
-  FFMPEG_PATH="${PATH}"
-  AC_ARG_WITH(ffmpeg-config-path,
-    [    --with-ffmpeg-config-path=PATH ffmpeg-config path (default search in \$PATH)],
-    [ if test "${with_ffmpeg_config_path}" != "no"
-      then
-        FFMPEG_PATH="${with_ffmpeg_config_path}:${PATH}"
-      fi ])
-  AC_PATH_PROG(FFMPEG_CONFIG, ffmpeg-config, no, ${FFMPEG_PATH})
-  if test "${FFMPEG_CONFIG}" != "no"
-  then
-    AC_CHECK_HEADERS(ffmpeg/avcodec.h)
-    AC_CHECK_HEADERS(postproc/postprocess.h)
-    VLC_ADD_PLUGINS([ffmpeg])
-    if test "${enable_sout}" != "no"; then
-        VLC_ADD_PLUGINS([stream_out_switcher])
-    fi
-    VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --cflags`])
-    VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --plugin-libs avcodec avformat postproc`])
+dnl Look for a ffmpeg-config (we are on debian )
+   FFMPEG_PATH="${PATH}"
+   AC_ARG_WITH(ffmpeg-config-path,
+     [    --with-ffmpeg-config-path=PATH ffmpeg-config path (default search in \$PATH)],
+     [ if test "${with_ffmpeg_config_path}" != "no"
+       then
+         FFMPEG_PATH="${with_ffmpeg_config_path}"
+       fi ])
+   AC_PATH_PROG(FFMPEG_CONFIG, ffmpeg-config, no, ${FFMPEG_PATH})
+   if test "${FFMPEG_CONFIG}" != "no"
+   then
+     AC_CHECK_HEADERS(ffmpeg/avcodec.h)
+     AC_CHECK_HEADERS(postproc/postprocess.h)
+     VLC_ADD_PLUGINS([ffmpeg])
+     if test "${enable_sout}" != "no"; then
+         VLC_ADD_PLUGINS([stream_out_switcher])
+     fi
+     VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --cflags`])
+     VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --plugin-libs avcodec avformat postproc`])
+  
   else
     AC_ARG_WITH(ffmpeg-mp3lame,
       [    --with-ffmpeg-mp3lame specify if ffmpeg has been compiled with mp3lame support],
@@ -2665,6 +2679,7 @@ AC_CHECK_HEADERS(png.h, [
   AC_CHECK_LIB(png, png_set_rows, [
     VLC_ADD_LDFLAGS([png],[-lpng -lz])
     VLC_ADD_PLUGINS([png])
+    VLC_ADD_PLUGINS([osdmenu])
     AC_DEFINE(HAVE_LIBPNG, [], [Define if you have the PNG library: libpng])],
     [],[-lz])
   LDFLAGS="${LDFLAGS_save}"
@@ -3369,20 +3384,20 @@ AC_ARG_ENABLE(portaudio,
    fi])
 
 dnl
-dnl  aRts module
+dnl  aRts module -- broken (freeze wxWidgets)
 dnl
 AC_ARG_ENABLE(arts,
 [  --enable-arts           aRts sound server (default disabled)],
 [if test "${enable_arts}" = "yes"
-   then
-     AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
-     if test "${ARTS_CONFIG}" != "no"
-     then
-       VLC_ADD_PLUGINS([arts])
-       VLC_ADD_CFLAGS([arts],[`${ARTS_CONFIG} --cflags`])
-       VLC_ADD_LDFLAGS([arts],[`${ARTS_CONFIG} --libs `])
-     fi
-   fi])
+ [  --enable-arts           aRts sound server (default disabled)],
+ [if test "${enable_arts}" = "yes"
+  then
+    AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
+    if test "${ARTS_CONFIG}" != "no"
+    then
+      VLC_ADD_PLUGINS([arts])
+      VLC_ADD_CFLAGS([arts],[`${ARTS_CONFIG} --cflags`])
+      VLC_ADD_LDFLAGS([arts],[`${ARTS_CONFIG} --libs `])
+    fi
+  fi])
 
 dnl
 dnl  ALSA module
@@ -4426,6 +4441,9 @@ AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,"${VERSION_MAJOR}", [version major numb
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,"${VERSION_MINOR}", [version minor number])
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_REVISION,"${VERSION_REVISION}", [version minor number])
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_EXTRA,"${VERSION_EXTRA}", [version minor number])
+AC_SUBST(VERSION_MAJOR)
+AC_SUBST(VERSION_MINOR)
+AC_SUBST(VERSION_REVISION)
 
 dnl Old definitions for version-dependant plugins
 dnl VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-+/___/'`"
@@ -4436,11 +4454,6 @@ dnl New definitions with value matching 0.8.2 release
 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__0_8_2", [String suffix for module functions])
 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, 0_8_2, [Symbol suffix for module functions])
 
-dnl Version number for ActiveX INF
-VERSION32="`echo -n ${VERSION} | sed -e 's/@<:@a-z\-@:>@//g' | sed -e 'y/./,/'`"
-VERSION32="`echo -n ${VERSION32}',0'`"
-AC_SUBST(VERSION32)
-
 DATA_PATH="${ac_tool_prefix}/share/vlc"
 AC_SUBST(DATA_PATH)
 PLUGIN_PATH="${ac_tool_prefix}/lib/vlc"
@@ -4539,12 +4552,8 @@ AC_CONFIG_FILES([
   modules/gui/Makefile
   modules/gui/beos/Makefile
   modules/gui/pda/Makefile
-  modules/gui/gtk/Makefile
-  modules/gui/gtk2/Makefile
-  modules/gui/kde/Makefile
   modules/gui/macosx/Makefile
   modules/gui/qnx/Makefile
-  modules/gui/qt/Makefile
   modules/gui/skins2/Makefile
   modules/gui/wxwidgets/Makefile
   modules/gui/wince/Makefile