]> git.sesse.net Git - vlc/blobdiff - configure.ac
Fix realaudio linking on Linux without the Win32 loader
[vlc] / configure.ac
index bcc75f20d19118714afadca9737ee71e14831d1e..e5e1b018a437c4ae7a89a9dc094890fc7c122b6b 100644 (file)
@@ -76,10 +76,10 @@ AC_ARG_WITH(contrib,
    if test "`grep HOST ${topdir}/extras/contrib/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"; then
       if test "${with_contrib}" = "yes"; then
         AC_MSG_RESULT([no])
-       AC_MSG_ERROR([ not using the libs in extras/contrib as it is not the same host])
+        AC_MSG_ERROR([ not using the libs in extras/contrib as it is not the same host])
       else
         AC_MSG_RESULT([no])
-       AC_MSG_WARN([ not using the libs in extras/contrib as it is not the same host])
+        AC_MSG_WARN([ not using the libs in extras/contrib as it is not the same host])
       fi
      else
   if test -d ${topdir}/extras/contrib/lib; then
@@ -358,9 +358,9 @@ dnl for program foo on win32
 case "${build_os}" in
     cygwin|msys)
         ac_executable_extensions=".exe"
-       ;;
+    ;;
     *)
-       ;;
+    ;;
 esac
 
 dnl 
@@ -718,7 +718,7 @@ if test "${ac_cv_have_plugins}" = "no"; then
     ac_cv_my_have_dlopen=yes,
     AC_CHECK_LIB(dl, dlopen,
       ac_cv_my_have_dlopen=yes
-      VLC_ADD_LIBS([libvlc],[-ldl]),
+      VLC_ADD_LIBS([libvlc realaudio],[-ldl]),
       AC_CHECK_LIB(svld, dlopen,
         ac_cv_my_have_dlopen=yes
         VLC_ADD_LIBS([libvlc],[-lsvld]))))
@@ -1698,10 +1698,10 @@ AS_IF([test "${enable_notify}" != "no" -a "${SYS}" != "mingw32"], [
       [
         VLC_ADD_PLUGINS([notify])
         VLC_ADD_CFLAGS(notify, [$NOTIFY_CFLAGS])
-       VLC_ADD_LIBS(notify, [$NOTIFY_LIBS])
+        VLC_ADD_LIBS(notify, [$NOTIFY_LIBS])
       ],[
-       AS_IF([test "${enable_notify}" = "yes"],[
-              AC_MSG_WARN( libnotify not found) ])
+    AS_IF([test "${enable_notify}" = "yes"],[
+        AC_MSG_WARN( libnotify not found) ])
       ])
   ])
 
@@ -1722,9 +1722,9 @@ AC_ARG_ENABLE(musicbrainz,
   [  --enable-musicbrainz    MusicBrainz support (default disabled) ])
   AS_IF([test "${enable_musicbrainz}" = "yes"],[
       PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz,
-       [ VLC_ADD_PLUGINS([musicbrainz])
-         VLC_ADD_LIBS([musicbrainz],[$MUSICBRAINZ_LIBS]) 
-         VLC_ADD_CFLAGS([musicbrainz],[$MUSICBRAINZ_CFLAGS])  ],
+    [ VLC_ADD_PLUGINS([musicbrainz])
+      VLC_ADD_LIBS([musicbrainz],[$MUSICBRAINZ_LIBS])
+      VLC_ADD_CFLAGS([musicbrainz],[$MUSICBRAINZ_CFLAGS])  ],
        [AC_MSG_WARN(MusicBrainz library not found)])
    ])
 
@@ -4147,55 +4147,36 @@ AC_ARG_ENABLE(fribidi,
   [  --enable-fribidi        fribidi support (default enabled)])
 if test "${enable_freetype}" != "no"
 then
-  FREETYPE_PATH="${PATH}"
-  AC_ARG_WITH(freetype-config-path,
-    [    --with-freetype-config-path=PATH freetype-config path (default search in \$PATH)],
-    [ if test "${with_freetype_config_path}" != "no"
-      then
-        FREETYPE_PATH="${with_freetype_config_path}:${PATH}"
-      fi ])
-  AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH})
-
-  if test "${FREETYPE_CONFIG}" != "no"
-  then
-    VLC_ADD_PLUGINS([freetype])
-    VLC_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags`])
-    VLC_ADD_LIBS([freetype],[`${FREETYPE_CONFIG} --libs`])
-    if test "${SYS}" = "mingw32"; then
-       VLC_ADD_LIBS([freetype],[-lxml2])
-    fi
+   PKG_CHECK_MODULES(FREETYPE, freetype2,[  
+      VLC_ADD_PLUGINS([freetype])
+      have_freetype=yes     
+      VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
+      VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
+      if test "${SYS}" = "mingw32"; then
+        VLC_ADD_LIBS([freetype skins2],[-lxml2])
+     fi
     AC_CHECK_HEADERS(fontconfig/fontconfig.h,
-      [VLC_ADD_CFLAGS([freetype],[-DHAVE_FONTCONFIG])
+      [VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
        VLC_ADD_LIBS([freetype],[-lfontconfig])])
     AC_CHECK_HEADERS(Carbon/Carbon.h,
       [VLC_ADD_LDFLAGS([freetype],[-Wl,-framework,Carbon])])
-  elif test "${enable_freetype}" =  "yes"
-  then
+  ],[
+  have_freetype=no
+  AS_IF([ test "${enable_freetype}" =  "yes"],[
     AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
 from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
+      ])
     ])
-  fi
+  ])
 
   dnl fribidi support
   if test "${enable_fribidi}" != "no"
   then
-    FRIBIDI_PATH="${PATH}"
-    AC_ARG_WITH(fribidi-config-path,
-      [    --with-fribidi-config-path=PATH fribidi-config path (default search in \$PATH)],
-      [ if test "${with_fribidi_config_path}" != "no"
-        then
-          FRIBIDI_PATH="${with_fribidi_config_path}:${PATH}"
-        fi ])
-    AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config, no, ${FRIBIDI_PATH})
-
-    if test "${FRIBIDI_CONFIG}" != "no"
-    then
-      VLC_ADD_CFLAGS([freetype], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
-      VLC_ADD_CPPFLAGS([skins2], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
-      VLC_ADD_LIBS([freetype], [`${FRIBIDI_CONFIG} --libs`])
-      VLC_ADD_LIBS([skins2], [`${FRIBIDI_CONFIG} --libs`])
+    PKG_CHECK_MODULES(FRIBIDI, fribidi, [
+      VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
+      VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
+    ])
     fi
-  fi
 fi
 
 dnl
@@ -4870,10 +4851,7 @@ if test "${enable_skins2}" = "yes" ||
   skins2_missing_lib="no"
 
   dnl freetype
-  if test "${FREETYPE_CONFIG}" != "no"; then
-    VLC_ADD_CPPFLAGS([skins2],[`${FREETYPE_CONFIG} --cflags`])
-    VLC_ADD_LIBS([skins2],[`${FREETYPE_CONFIG} --libs`])
-  else
+  if test "${have_freetype}" != "yes"; then
     skins2_missing_lib="yes"
     if test "${enable_skins2}" = "yes"; then
       AC_MSG_ERROR([Could not find freetype (required for skins2)])
@@ -5156,7 +5134,11 @@ AS_IF([test "${enable_qt4}" != "no" &&
       AC_DEFINE([HAVE_QT4], 1, [Define to 1 if you have QT4 library.])
       ALIASES="${ALIASES} qvlc"
       enableqt4=true
-      VLC_ADD_LIBS([qt4],[$QT4_LIBS])
+      if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "cygwin" -a "${SYS}" != "darwin"; then
+          VLC_ADD_LIBS([qt4],[$QT4_LIBS -lX11])
+      else
+          VLC_ADD_LIBS([qt4],[$QT4_LIBS])
+      fi
       VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS -DQT4LOCALEDIR=\\\\\\\"$($PKG_CONFIG --variable=prefix QtCore)/share/qt4/translations/\\\\\\\"])
       AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
       AC_PATH_PROG(RCC, rcc, rcc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
@@ -5658,7 +5640,7 @@ AS_IF([test "${enable_loader}" = "yes"],
     VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/libs/loader])
     VLC_ADD_LIBS([quicktime],[../../libs/loader/libloader.la -lpthread])
     VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/libs/loader -DLOADER])
-    VLC_ADD_LIBS([realaudio],[../../libs/loader/libloader.la -ldl -lpthread])
+    VLC_ADD_LIBS([realaudio],[../../libs/loader/libloader.la])
   ])
 
 dnl