File librcc-0.2.10-libguess.patch of Package librcc
Index: librcc-0.2.10/configure.in
===================================================================
--- librcc-0.2.10.orig/configure.in
+++ librcc-0.2.10/configure.in
@@ -208,7 +208,7 @@ ENCA_LIBS=""
ENCA_INCLUDES=""
HAVE_ENCA=no
LIBGUESS_LIBS=""
-LIBGUESS_INCLUDES=""
+LIBGUESS_CFLAGS=""
HAVE_LIBGUESS=no
AC_ARG_ENABLE( force-dynamic-engines,
@@ -230,12 +230,7 @@ if test "x$enable_force_dynamic_engines"
])])
fi
-AC_CHECK_HEADER(libguess.h, [AC_CHECK_LIB(guess, guess_jp, [
- AC_DEFINE(HAVE_LIBGUESS,1,[Defines if libguess is available])
- LIBGUESS_LIBS="-lguess"
- LIBGUESS_INCLUDES=""
- HAVE_LIBGUESS=yes
-])])
+PKG_CHECK_MODULES(LIBGUESS, libguess >= 1.0, HAVE_LIBGUESS=yes, HAVE_LIBGUESS=no)
AM_CONDITIONAL(HAVE_RCD, [ test "x$HAVE_RCD" = "xyes" ])
AM_CONDITIONAL(HAVE_ENCA, [ test "x$HAVE_ENCA" = "xyes" ])
@@ -246,7 +241,7 @@ AC_SUBST(RCD_INCLUDES)
AC_SUBST(ENCA_LIBS)
AC_SUBST(ENCA_INCLUDES)
AC_SUBST(LIBGUESS_LIBS)
-AC_SUBST(LIBGUESS_INCLUDES)
+AC_SUBST(LIBGUESS_CFLAGS)
USE_DLOPEN=no
if test "x$HAVE_DLOPEN" = "xyes"; then
Index: librcc-0.2.10/engines/Makefile.am
===================================================================
--- librcc-0.2.10.orig/engines/Makefile.am
+++ librcc-0.2.10/engines/Makefile.am
@@ -21,4 +21,4 @@ western_engine_la_LDFLAGS = -module -avo
western_engine_la_LIBADD = ../src/librcc.la
-AM_CPPFLAGS = -I../src @RCD_INCLUDES@ @LIBGUESS_INCLUDES@
+AM_CPPFLAGS = -I../src @RCD_INCLUDES@ @LIBGUESS_CFLAGS@
Index: librcc-0.2.10/engines/libguess.c
===================================================================
--- librcc-0.2.10.orig/engines/libguess.c
+++ librcc-0.2.10/engines/libguess.c
@@ -64,7 +64,7 @@ struct rcc_guess_engine_t guessJPEngine
&guessDetect,
{"UTF-8", "UTF-16", "ISO-2022-JP", "EUC-JP", "SJIS", NULL}
},
- &guess_jp
+ NULL
};
struct rcc_guess_engine_t guessZHEngine = {
@@ -110,7 +110,7 @@ struct rcc_guess_engine_t guessKREngine
&guessDetect,
{"UTF-8", "UTF-16", "ISO-2022-KR", "EUC-KR", "JOHAB", NULL}
},
- &guess_kr
+ NULL
};