You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging/redhat/kdebindings/kdebindings-3.5.6-libgcj.patch

49 lines
2.0 KiB

--- kdebindings-3.5.6/admin/acinclude.m4.in.libgcj 2007-01-15 17:16:52.000000000 -0600
+++ kdebindings-3.5.6/admin/acinclude.m4.in 2007-03-19 12:08:45.000000000 -0500
@@ -5261,7 +5261,18 @@
dnl Look for libjvm.so
kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
dnl Look for libgcj.so
- kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
+ if (`$PKG_CONFIG --exists libgcj-4.1`) ; then
+ JVMLIBS=`$PKG_CONFIG --libs libgcj-4.1`
+ kde_java_libgcjdir=`$PKG_CONFIG --variable=libdir libgcj-4.1`
+ elif (`$PKG_CONFIG --exists libgcj`) ; then
+ JVMLIBS=`$PKG_CONFIG --libs libgcj`
+ kde_java_libgcjdir=`$PKG_CONFIG --variable=libdir libgcj`
+ else
+ kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
+ fi
dnl Look for libhpi.so and avoid green threads
kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
@@ -5302,10 +5313,6 @@
if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
fi
- else
- if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
- AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
- fi
fi
if test ! -x "$kde_java_bindir/java"; then
@@ -5359,7 +5366,13 @@
if test "x$kde_java_libgcjdir" = "x"; then
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
else
- JVMLIBS="-L$kde_java_libgcjdir -lgcj"
+ if test "x$JVMLIBS" = "x"; then
+ if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
+ AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
+ else
+ JVMLIBS="-L$kde_java_libgcjdir -lgcj"
+ fi
+ fi
fi
AC_MSG_RESULT([java JDK in $kde_java_bindir])