]> git.sesse.net Git - vlc/blobdiff - configure.ac
Create a modules-like directory for libraries
[vlc] / configure.ac
index e4edc25e9fea78f26a3b3911ffb018c647aeff29..69bd5c91d37944cb236760eadf4f867e5431aefe 100644 (file)
@@ -184,6 +184,7 @@ case "${host_os}" in
     VLC_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation])
     VLC_ADD_LDFLAGS([mkv mp4], [-framework IOKit -framework CoreFoundation])
     VLC_ADD_CFLAGS([libvlc vlc],[-x objective-c])
+    VLC_ADD_LDFLAGS([vlc],[-undefined dynamic_lookup])
     ;;
   *mingw32* | *cygwin* | *wince* | *mingwce* | *pe*)
     AC_CHECK_TOOL(WINDRES, windres, :)
@@ -212,7 +213,7 @@ case "${host_os}" in
         CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
         VLC_ADD_LDFLAGS([libvlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
         VLC_ADD_LDFLAGS([cdda vcdx cddax],[-lwinmm])
-        VLC_ADD_LDFLAGS([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 growl],[-lws2_32])
+        VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync growl flac ts audioscrobbler],[-lws2_32])
     fi
     if test "${SYS}" = "mingwce"; then
         # add ws2 for closesocket, select, recv
@@ -300,7 +301,7 @@ fi
 dnl
 dnl Gettext stuff
 dnl
-ALL_LINGUAS="af ar bn ca co cs da de el en_GB es eu fr fur gl he hi hu it ja ka ko lt lv ms my nb ne nl nn no oc pa pl ps pt_BR pt_PT ro ru sk sl sq sv tet th tl tr zh_CN zh_TW"
+ALL_LINGUAS="af ar bn ca co cs da de el en_GB es eu fr fur gl he hi hu it ja ka ko lt lv ms my ne nl no oc pa pl ps pt_BR pt_PT ro ru sk sl sq sv tet th tl tr zh_CN zh_TW"
 AM_GNU_GETTEXT_VERSION(0.11.5)
 AM_GNU_GETTEXT
 AS_IF([test "${nls_cv_force_use_gnu_gettext}" = "yes"], [
@@ -843,8 +844,8 @@ fi
 dnl Check for dbus
 AC_ARG_ENABLE(dbus,
   [  --enable-dbus           Linux D-BUS message bus system (default enabled)])
-if test "${enable_dbus}" != "no" -a "$SYS" = "Linux"
+
+if test "${enable_dbus}" != "no" -a "${SYS}" = "linux"
 then
   dnl api stable dbus
   PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0,
@@ -1156,7 +1157,7 @@ dnl
 dnl  default modules
 dnl
 VLC_ADD_PLUGINS([dummy logger memcpy])
-VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta])
+VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 vc1 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta])
 VLC_ADD_PLUGINS([cvdsub svcdsub spudec telx subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac])
 VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise extract sharpen])
 VLC_ADD_PLUGINS([converter_fixed mono])
@@ -1169,6 +1170,7 @@ VLC_ADD_PLUGINS([access_directory access_file access_udp access_tcp])
 VLC_ADD_PLUGINS([access_http access_mms access_ftp])
 VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
 VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
+VLC_ADD_PLUGINS([packetizer_vc1])
 
 
 if test "${SYS}" != "mingwce"; then
@@ -1359,18 +1361,24 @@ AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
 if test "${ac_cv_c_altivec}" != "no"; then
   CPPFLAGS="${CPPFLAGS_save} ${ac_cv_c_altivec}"
 fi
-AC_CHECK_HEADERS(altivec.h)
-CPPFLAGS="${CPPFLAGS_save}"
 
-if test "${ac_cv_c_altivec}" != "no"; then
-  AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
-  VLC_ADD_CFLAGS([libvlc],[${ac_cv_c_altivec}])
-  VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}])
-  VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
-  if test "${ac_cv_altivec_inline}" = "no"; then
-    ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
+AS_IF( test "${enable_altivec}" != "no",
+[
+  AC_CHECK_HEADERS(altivec.h)
+  CPPFLAGS="${CPPFLAGS_save}"
+  
+  if test "${ac_cv_c_altivec}" != "no"; then
+    AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
+    VLC_ADD_CFLAGS([libvlc],[${ac_cv_c_altivec}])
+    VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}])
+    VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
+    if test "${ac_cv_altivec_inline}" = "no"; then
+      ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
+    fi
   fi
-fi
+],[
+  CPPFLAGS="${CPPFLAGS_save}"
+])
 
 AC_CACHE_CHECK([if linker needs -framework vecLib],
     [ac_cv_ld_altivec],
@@ -1488,7 +1496,8 @@ then
   VLC_ADD_PLUGINS([packetizer_copy])
 
   VLC_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp stream_out_description vod_rtsp])
-  VLC_ADD_PLUGINS([stream_out_duplicate stream_out_gather stream_out_display stream_out_transcode stream_out_bridge stream_out_mosaic_bridge stream_out_autodel])
+  VLC_ADD_PLUGINS([stream_out_duplicate stream_out_display stream_out_transcode stream_out_bridge stream_out_mosaic_bridge stream_out_autodel])
+  VLC_ADD_PLUGINS([stream_out_gather])
 #  VLC_ADD_PLUGINS([stream_out_transrate])
 #  VLC_ADD_PLUGINS([rtcp])
   VLC_ADD_PLUGINS([profile_parser])
@@ -1629,7 +1638,7 @@ if test "${enable_live555}" != "no"; then
     AC_MSG_WARN(--with-livedotcom-tree is deprecated. Use --with-live555-tree instead.)
   with_live555_tree="${with_livedotcom_tree}"
   fi
-  
+
   if test -z "${with_live555_tree}" -a "${CXX}" != ""; then
     AC_LANG_PUSH(C++)
     CPPFLAGS_save="${CPPFLAGS}"
@@ -2407,6 +2416,11 @@ AC_CHECK_FUNCS(inet_pton,[have_ipv6=yes],[
 AS_IF([test "${have_ipv6}" = "yes"], [
   AC_DEFINE(HAVE_INET_PTON, 1, [Define to 1 if you have inet_pton().])])
 
+
+AC_CHECK_FUNCS(inet_ntop,[
+  AC_DEFINE(HAVE_INET_NTOP, 1, [Define to 1 if you have inet_ntop().])])
+
+
 dnl
 dnl  ogg demux plugin
 dnl
@@ -2900,7 +2914,6 @@ dnl Trying with pkg-config
       LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
       AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
       AC_CHECK_HEADERS(ffmpeg/avformat.h)
-      AC_CHECK_HEADERS(ffmpeg/swscale.h)
       AC_CHECK_HEADERS(ffmpeg/avutil.h)
       AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
 
@@ -2928,6 +2941,7 @@ dnl Trying with pkg-config
       CPPFLAGS="${CPPFLAGS_save}"
 
       AC_CHECK_LIB(swscale, sws_getContext, [
+        AC_CHECK_HEADERS(ffmpeg/swscale.h)
         VLC_ADD_LDFLAGS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL])
       LDFLAGS="${LDFLAGS_save}"
       CPPFLAGS="${CPPFLAGS_save}"
@@ -3045,17 +3059,17 @@ then
       AC_MSG_RESULT(no)
       AC_MSG_ERROR([cannot cd to ${with_twolame_tree}])
     fi
-    if test -f "${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a"
+    if test -f "${real_twolame_tree}/libtwolame/.libs/libtwolame.a"
     then
       dnl  Use a custom twolame
-      AC_MSG_RESULT(${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a)
+      AC_MSG_RESULT(${real_twolame_tree}/libtwolame/.libs/libtwolame.a)
       VLC_ADD_BUILTINS([twolame])
-      VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a])
-      VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame -DLIBTWOLAME_STATIC])
+      VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/libtwolame/.libs/libtwolame.a])
+      VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/libtwolame -DLIBTWOLAME_STATIC])
     else
       dnl  The given libtwolame wasn't built
       AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
+      AC_MSG_ERROR([cannot find ${real_twolame_tree}/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
     fi
   else
     CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame} -DLIBTWOLAME_STATIC"
@@ -3122,10 +3136,14 @@ AC_CHECK_HEADERS(sysfs/libsysfs.h, [
 dnl
 dnl skins2 module
 dnl
-AC_CHECK_HEADERS(libtar.h, [
-  VLC_ADD_LDFLAGS([skins2],[-ltar])
-] )
+AC_ARG_ENABLE(libtar,
+  [  --enable libtar support for skins2 (default enabled)])
 
+AS_IF([test "${enable_libtar}" != "no"],[
+  AC_CHECK_HEADERS(libtar.h, [
+    VLC_ADD_LDFLAGS([skins2],[-ltar])
+  ] )
+])
 
 
 dnl
@@ -3821,6 +3839,8 @@ dnl  SDL module
 dnl
 AC_ARG_ENABLE(sdl,
   [  --enable-sdl            SDL support (default enabled)])
+AC_ARG_ENABLE(sdl-image,
+  [  --enable-sdl-image            SDL image support (default enabled)])
 if test "${enable_sdl}" != "no"
 then
   SDL_PATH="${PATH}"
@@ -3874,21 +3894,23 @@ then
 Please install it and try again. Alternatively you can also configure with
 --disable-sdl.])
       ])])
-    AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE,
-      <${SDL_IMAGE}>, Indicate the path of SDL_image.h)
-      VLC_ADD_PLUGINS([sdl_image])
-      AC_CHECK_LIB(png, png_set_rows,
-        [VLC_ADD_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz])
-      AC_CHECK_LIB(jpeg, jpeg_start_decompress,
-        [VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])])
-      AC_CHECK_LIB(tiff, TIFFClientOpen,
-        [VLC_ADD_LDFLAGS([sdl_image],[-ltiff])])
-      VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])],
-      [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>,
-          As a last resort we also test for SDL_image.h presence),
-      [ AC_MSG_WARN([The development package for SDL_image is not installed.
-You should install it alongside your SDL package.])
-      ])])
+    AS_IF([ test "${enable_sdl_image}" != "no"],[
+      AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE,
+        <${SDL_IMAGE}>, Indicate the path of SDL_image.h)
+        VLC_ADD_PLUGINS([sdl_image])
+        AC_CHECK_LIB(png, png_set_rows,
+          [VLC_ADD_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz])
+        AC_CHECK_LIB(jpeg, jpeg_start_decompress,
+          [VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])])
+        AC_CHECK_LIB(tiff, TIFFClientOpen,
+          [VLC_ADD_LDFLAGS([sdl_image],[-ltiff])])
+        VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])],
+        [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>,
+            As a last resort we also test for SDL_image.h presence),
+        [ AC_MSG_WARN([The development package for SDL_image is not installed.
+  You should install it alongside your SDL package.])
+        ])])
+    ])
     CPPFLAGS="${CPPFLAGS_save}"
     if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
     then
@@ -4604,13 +4626,20 @@ if test "${enable_skins2}" = "yes" ||
     VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
     VLC_ADD_LDFLAGS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
 
+  else if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "darwin"); then
+    VLC_ADD_PLUGINS([skins2])
+    ALIASES="${ALIASES} svlc"
+    VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
+    VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+    VLC_ADD_LDFLAGS([skins2],[-framework Carbon])
+
   else if test "${skins2_missing_lib}" = "no"; then
     VLC_ADD_PLUGINS([skins2])
     ALIASES="${ALIASES} svlc"
     VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} -DX11_SKINS])
     VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
     VLC_ADD_LDFLAGS([skins2],[${X_LIBS} ${X_PRE_LIBS} -lXext -lX11])
-  fi fi
+  fi fi fi
 fi
 
 
@@ -4755,18 +4784,11 @@ dnl
 dnl  wxWidgets module
 dnl
 AC_ARG_ENABLE(wxwidgets,
-  [  --enable-wxwidgets      wxWidgets support (default enabled)])
-if test "${enable_wxwindows}" 
-then
-  AC_MSG_WARN(--{en|dis}able-wxwindows is deprecated. Use --{en|dis}able-wxwidgets instead.)
-fi
+  [  --enable-wxwidgets      wxWidgets support (default disabled)])
 
-if test "${enable_wxwindows}" = "no"
-then
-  enable_wxwidgets="no"
-fi
-if test "${enable_wxwidgets}" != "no"
+if test "${enable_wxwidgets}" = "yes"
 then
+  AC_MSG_WARN([wxWidgets support is deprecated and will be removed. Consider using Qt4 instead.])
   WXWIDGETS_PATH="${PATH}"
   AC_ARG_WITH(wx-config-path,
     [    --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
@@ -4787,7 +4809,7 @@ then
   then
     if expr 2.6.0 \> `${WX_CONFIG} --version` >/dev/null ||  expr 2.7.0 \<= `${WX_CONFIG} --version` >/dev/null
     then
-      AC_MSG_ERROR([You need wxWidgets of the 2.6 branch. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
+      AC_MSG_ERROR([You need wxWidgets of the 2.6 branch. Please upgrade/downgrade and try again. Better yet, you can configure with --disable-wxwidgets.])
     fi
     AC_LANG_PUSH(C++)
     # Turn this error:
@@ -4821,7 +4843,7 @@ then
       # the following is required to compile for win32
       VLC_ADD_CXXFLAGS([wxwidgets],[-D_UNICODE -DUNICODE])
     else
-      AC_MSG_ERROR([You need a unicode build of wxWidgets. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
+      AC_MSG_ERROR([You need a unicode build of wxWidgets. Please fix that and try again. Better yet, you can configure with --disable-wxwidgets.])
     fi
     if test "$have_libcdio" = "yes"
     then 
@@ -4863,19 +4885,25 @@ dnl QT 4
 dnl
 enableqt4=false
 AC_ARG_ENABLE(qt4,
-  [  --enable-qt4            QT 4 support (default disabled) ],
-  [if test "${enable_qt4}" = "yes"; then
-      PKG_CHECK_MODULES(QT4, QtCore QtGui,
-       [ VLC_ADD_PLUGINS([qt4])
-          ALIASES="${ALIASES} qvlc"
-         enableqt4=true
-         VLC_ADD_LDFLAGS([qt4],[$QT4_LIBS])
-         VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS])
-         MOC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/moc
-         RCC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/rcc
-         UIC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/uic],
-       [AC_MSG_WARN(QT4 library not found)])
-   fi])
+  [  --enable-qt4            QT 4 support (default enabled) ])
+AS_IF([test "${enable_qt4}" != "no" &&
+  (test "${SYS}" != "darwin" || test "${enable_qt4}" = "yes")], [
+  PKG_CHECK_MODULES(QT4, QtCore QtGui,
+    [ VLC_ADD_PLUGINS([qt4])
+      ALIASES="${ALIASES} qvlc"
+      enableqt4=true
+      VLC_ADD_LDFLAGS([qt4],[$QT4_LIBS])
+      VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS])
+      MOC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/moc
+      RCC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/rcc
+      UIC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/uic],
+      AS_IF([test "${enable_qt4}" = "yes"],[
+       AC_MSG_ERROR(QT4 library not found)
+      ],[
+        AC_MSG_WARN(QT4 library not found)
+      ])
+    )
+])
 AM_CONDITIONAL(ENABLE_QT4, test "$enableqt4" = "true")
 
 dnl
@@ -5008,13 +5036,16 @@ AC_ARG_ENABLE(macosx,
   [  --enable-macosx         MacOS X support (default enabled on MacOS X)],
   [if test "${enable_macosx}" = "yes"
    then
-     VLC_ADD_BUILTINS([macosx])
-     VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL])
+     VLC_ADD_PLUGINS([access_eyetv])
+     VLC_ADD_LDFLAGS([access_eyetv], [-framework CoreFoundation])
+     VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL -framework QTKit])
      VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] )
    fi],
   [AC_CHECK_HEADERS(Cocoa/Cocoa.h,
+     VLC_ADD_PLUGINS([access_eyetv])
+     VLC_ADD_LDFLAGS([access_eyetv], [-framework CoreFoundation])
      VLC_ADD_BUILTINS([macosx])
-     VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL])
+     VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL -framework QTKit])
      VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] )
    )])
 CFLAGS=$ORIGCFLAGS
@@ -5273,12 +5304,12 @@ AC_ARG_ENABLE(loader,
 AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
 AS_IF([test "${enable_loader}" = "yes"],
   [ VLC_ADD_PLUGINS([dmo])
-    VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/loader])
-    VLC_ADD_LDFLAGS([dmo],[../../../loader/libloader.la -lpthread])
-    VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/loader])
-    VLC_ADD_LDFLAGS([quicktime],[../../loader/libloader.la -lpthread])
-    VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/loader -DLOADER])
-    VLC_ADD_LDFLAGS([realaudio],[../../loader/libloader.la -ldl -lpthread])
+    VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/libs/loader])
+    VLC_ADD_LDFLAGS([dmo],[../../../libs/loader/libloader.la -lpthread])
+    VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/libs/loader])
+    VLC_ADD_LDFLAGS([quicktime],[../../libs/loader/libloader.la -lpthread])
+    VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/libs/loader -DLOADER])
+    VLC_ADD_LDFLAGS([realaudio],[../../libs/loader/libloader.la -ldl -lpthread])
   ])
 
 dnl
@@ -5370,13 +5401,19 @@ then
            # include <npapi.h>
            #endif
           ])
-        if test "${MOZILLA_CONFIG_HEADERS}" = "0"; then
+        if test "${MOZILLA_REQUIRED_HEADERS}" = "0"; then
             AC_MSG_ERROR([Please install the Firefox development tools; mozilla-config.h, plugin/npapi.h and plugin/npruntime.h were not found.])
         fi
         MOZILLA_REQUIRED_HEADERS=
         mozilla=:
         firefox_include=`pkg-config --variable=includedir firefox-plugin`
-        MOZILLA_CONFIG_H="${firefox_include}/mozilla-config.h"
+        if test -f "${firefox_include}/mozilla-config.h" -a -f "${firefox_include}/mozilla-config32.h"; then
+            MOZILLA_CONFIG_H="${firefox_include}/mozilla-config32.h"
+        elif test -f "${firefox_include}/mozilla-config.h" -a -f "${firefox_include}/mozilla-config64.h"; then
+            MOZILLA_CONFIG_H="${firefox_include}/mozilla-config64.h"
+        else
+            MOZILLA_CONFIG_H="${firefox_include}/mozilla-config.h"
+        fi
         if grep '^#define MOZ_X11 1' ${MOZILLA_CONFIG_H} 2>&1 > /dev/null ; then
             VLC_ADD_LDFLAGS([mozilla], [${X_LIBS} ${X_PRE_LIBS} -lX11 -lXt])
         fi
@@ -5734,7 +5771,8 @@ AC_CONFIG_FILES([
   doc/Makefile
   intl/Makefile
   ipkg/Makefile
-  loader/Makefile
+  libs/Makefile
+  libs/loader/Makefile
   modules/Makefile
   mozilla/Makefile
   m4/Makefile