Author: glen Date: Wed Oct 25 19:04:17 2006 GMT Module: SOURCES Tag: HEAD ---- Log message: - try pkgconfig for openobex detection
---- Files affected: SOURCES: k68-openobex-pkgconfig.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: SOURCES/k68-openobex-pkgconfig.patch diff -u /dev/null SOURCES/k68-openobex-pkgconfig.patch:1.1 --- /dev/null Wed Oct 25 21:04:17 2006 +++ SOURCES/k68-openobex-pkgconfig.patch Wed Oct 25 21:04:12 2006 @@ -0,0 +1,107 @@ +--- k68-0.2.1/configure.in.in 2003-11-11 21:54:39.000000000 +0200 ++++ k68-0.2.1.pkgconfig/configure.in.in 2006-10-25 22:01:38.626559898 +0300 +@@ -15,55 +15,69 @@ + dnl Version checking fixed by Christian W. Zuckschwerdt 2002-10-17 + dnl Modified for K68 from openobex-apps-1.0.0 by James Stembridge 2003-04-07 + dnl ++ ++if test -z "$PKG_CONFIG"; then ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++fi + +-AC_PATH_PROG(OPENOBEX_CONFIG, openobex-config, no) ++if test "$PKG_CONFIG" != "no" ; then ++ PKG_CHECK_MODULES(Openobex, openobex, [ ++ OPENOBEX_CFLAGS=`pkg-config --cflags openobex` ++ OPENOBEX_LIBS=`pkg-config --libs openobex` ++ ]) ++ if ! `$PKG_CONFIG --atleast-version="1.0.0" openobex`; then ++ AC_MSG_ERROR(Installed openobex library too old ($obex_config_version)) ++ fi + +-if test "$OPENOBEX_CONFIG" = "no" ; then +- AC_MSG_ERROR(openobex-config not found. Pehaps openobex is not installed.) +-fi ++else ++ AC_PATH_PROG(OPENOBEX_CONFIG, openobex-config, no) + +-OPENOBEX_CFLAGS=`$OPENOBEX_CONFIG --cflags` +-OPENOBEX_LIBS=`$OPENOBEX_CONFIG --libs` ++ if test "$OPENOBEX_CONFIG" = "no" ; then ++ AC_MSG_ERROR(openobex-config not found. Pehaps openobex is not installed.) ++ fi ++ OPENOBEX_CFLAGS=`$OPENOBEX_CONFIG --cflags` ++ OPENOBEX_LIBS=`$OPENOBEX_CONFIG --libs` + +-min_obex_version=1.0.0 +-AC_MSG_CHECKING(for openobex - version >= $min_obex_version) +-obex_config_version=`$OPENOBEX_CONFIG --version` +- +-obex_config_major_version=`$OPENOBEX_CONFIG --version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` +-obex_config_minor_version=`$OPENOBEX_CONFIG --version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` +-obex_config_micro_version=`$OPENOBEX_CONFIG --version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` +- +-obex_req_major_version=`echo $min_obex_version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` +-obex_req_minor_version=`echo $min_obex_version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` +-obex_req_micro_version=`echo $min_obex_version | \ +- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` ++ min_obex_version=1.0.0 ++ AC_MSG_CHECKING(for openobex - version >= $min_obex_version) ++ obex_config_version=`$OPENOBEX_CONFIG --version` ++ ++ obex_config_major_version=`echo $obex_config_version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` ++ obex_config_minor_version=`echo $obex_config_version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` ++ obex_config_micro_version=`echo $obex_config_version ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` ++ ++ obex_req_major_version=`echo $min_obex_version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` ++ obex_req_minor_version=`echo $min_obex_version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` ++ obex_req_micro_version=`echo $min_obex_version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + +-if test $obex_req_major_version -lt $obex_config_major_version ; then +- obex_config_version_ok="yes" +-fi +-if test $obex_req_major_version -eq $obex_config_major_version ; then +- if test $obex_req_minor_version -lt $obex_config_minor_version ; then ++ if test $obex_req_major_version -lt $obex_config_major_version ; then + obex_config_version_ok="yes" +- fi +- if test $obex_req_minor_version -eq $obex_config_minor_version ; then +- if test $obex_req_micro_version -le $obex_config_micro_version ; then ++ fi ++ if test $obex_req_major_version -eq $obex_config_major_version ; then ++ if test $obex_req_minor_version -lt $obex_config_minor_version ; then + obex_config_version_ok="yes" + fi ++ if test $obex_req_minor_version -eq $obex_config_minor_version ; then ++ if test $obex_req_micro_version -le $obex_config_micro_version ; then ++ obex_config_version_ok="yes" ++ fi ++ fi + fi +-fi + +-if test "$obex_config_version_ok" != "yes" ; then +- AC_MSG_ERROR(Installed openobex library too old ($obex_config_version)) ++ if test "$obex_config_version_ok" != "yes" ; then ++ AC_MSG_ERROR(Installed openobex library too old ($obex_config_version)) ++ fi ++ AC_MSG_RESULT(yes) + fi + + AC_SUBST(OPENOBEX_CFLAGS) + AC_SUBST(OPENOBEX_LIBS) +-AC_MSG_RESULT(yes) + + dnl + dnl Check for Bluetooth library ================================================================ _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
