summaryrefslogtreecommitdiffstats
path: root/conf.diff
blob: 3636fe03f407defdd98633dcd58c4dd25e98b4ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- configure.in.in	2007-10-06 12:25:00.851848655 +0200
+++ configure.in.in	2007-09-29 00:20:22.000000000 +0200
@@ -132,16 +137,16 @@
 
 AM_CONDITIONAL(include_kgstplayer, [test "x$have_gst" = "xyes" && test "x$have_gst_plugins" = "xyes"])
 
-buildnpp=yes
+hasnspr=yes
 LIBNSPR_LIBS=""
 LIBNSPR_CFLAGS=""
 LIBTQTDBUS=""
 LIBDBUS_CFLAGS=""
 AC_ARG_ENABLE(nspr, [  --enable-npplayer    Enables building with npp support],
 [if test "x$enableval" == "xno"; then
-        buildnpp=no
+        hasnspr=no
     fi])
-if test "$buildnpp" = "yes"; then
+if test "$hasnspr" = "yes"; then
     if test "$PKGCONFIGFOUND" = "yes" ; then
         DBUS_REQ=1.0.0
         PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQ,
@@ -150,9 +155,22 @@
             AC_DEFINE(HAVE_DBUS, 1, [have DBus])
             LIBTQTDBUS="`$PKG_CONFIG --libs dbus-1` -ldbus-qt-1"
 	    LIBDBUS_CFLAGS="`$PKG_CONFIG --cflags dbus-1`"
-            AC_DEFINE(HAVE_NSPR, 1, [build Netscape plugin loader])
-            LIBNSPR_LIBS="`$PKG_CONFIG --libs gtk+-x11-2.0` `$PKG_CONFIG --libs dbus-glib-1`"
-            LIBNSPR_CFLAGS="`$PKG_CONFIG --cflags gtk+-x11-2.0` `$PKG_CONFIG --cflags dbus-glib-1`"
+            PKG_CHECK_MODULES(NSPR, nspr >= 1.8.0,
+                              have_nspr=yes,have_nspr=no)
+            if test "x$have_nspr" = "xno"; then
+                AC_CHECK_PROG(NSPRCONFIGFOUND, nspr-config,[yes])
+                if test $NSPRCONFIGFOUND; then
+                    have_nspr=yes
+                    NSPR_CFG=nspr-config
+                fi
+            else
+                NSPR_CFG=pkg-config nspr
+            fi
+            if test "x$have_nspr" = "xyes"; then
+                AC_DEFINE(HAVE_NSPR, 1, [have Netscape Portable Runtime])
+                LIBNSPR_LIBS="`$PKG_CONFIG --libs gtk+-x11-2.0` `$PKG_CONFIG --libs dbus-glib-1` `$NSPR_CFG --libs`"
+                LIBNSPR_CFLAGS="`$PKG_CONFIG --cflags gtk+-x11-2.0` `$PKG_CONFIG --cflags dbus-glib-1` `$NSPR_CFG --cflags`"
+            fi
         fi
     fi
 fi