]> git.sesse.net Git - vlc/blobdiff - configure.ac
Redo 12234; this time with (hopefully) Mac OS X support
[vlc] / configure.ac
index 05a31d6a6bf55001c4b767363e035c83c639ed0d..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
@@ -290,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}])
@@ -1789,7 +1798,7 @@ then
     else
       VLC_ADD_BUILTINS([dvb])
     fi
-  ],[])
+  ],[AC_MSG_WARN(linux-dvb headers not found, dvb disabled)])
   CPPFLAGS="${CPPFLAGS_save}"
 fi
 
@@ -2014,9 +2023,6 @@ AC_CHECK_HEADERS(id3tag.h, [
 dnl
 dnl  ffmpeg decoder/demuxer plugin
 dnl
-dnl we try to find ffmpeg using : 1- ffmpeg-config, 2- pkg-config
-dnl                            3- default place, 4- given tree
-
 AC_ARG_ENABLE(ffmpeg,
 [  --enable-ffmpeg         ffmpeg codec (default enabled)])
 if test "${enable_ffmpeg}" != "no"
@@ -2043,21 +2049,6 @@ dnl Look for a ffmpeg-config (we are on debian )
      VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --plugin-libs avcodec avformat postproc`])
   
   else
- Trying with pkg-config
-   PKG_CHECK_MODULES(FFMPEG,libavcodec libavformat,
-    [
-     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_CFLAGS}])
-     VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_LIBS}])
-
-    ],
-    [
-     
     AC_ARG_WITH(ffmpeg-mp3lame,
       [    --with-ffmpeg-mp3lame specify if ffmpeg has been compiled with mp3lame support],
       [
@@ -2182,7 +2173,6 @@ dnl Look for a ffmpeg-config (we are on debian )
         VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavformat])
       fi
     fi
-    ])
   fi
 fi
 
@@ -2689,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}"
@@ -3393,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
@@ -4450,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/.-+/___/'`"
@@ -4460,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"
@@ -4563,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