From: Adam Dickmeiss Date: Mon, 14 Aug 2006 12:18:49 +0000 (+0000) Subject: Using suffix 2.0 for development tools idzebra-config and idzebra.m4. X-Git-Tag: ZEBRA.2.0.0 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=d677148d5bbcb1bfd119d0ae83ff19c0f0012082;p=m4-moved-to-github.git Using suffix 2.0 for development tools idzebra-config and idzebra.m4. This means that Zebra 2.0 is completely separate from potential newer releases. --- diff --git a/idzebra-2.0.m4 b/idzebra-2.0.m4 new file mode 100644 index 0000000..25d08c8 --- /dev/null +++ b/idzebra-2.0.m4 @@ -0,0 +1,58 @@ +## $Id: idzebra-2.0.m4,v 1.1 2006-08-14 12:18:49 adam Exp $ +## +# Use this m4 function for autoconf if you use ID Zebra in your own +# configure script. + +AC_DEFUN([IDZEBRA_2_0_INIT], +[ + AC_SUBST(IDZEBRA_LIBS) + AC_SUBST(IDZEBRA_LALIBS) + AC_SUBST(IDZEBRA_CFLAGS) + AC_SUBST(IDZEBRA_VERSION) + idzebraconfig=NONE + idzebrapath=NONE + AC_ARG_WITH(idzebra, [ --with-idzebra=DIR use idzebra-config in DIR (example /home/idzebra-2.0.0)], [idzebrapath=$withval]) + if test "x$idzebrapath" != "xNONE"; then + idzebraconfig=$idzebrapath/idzebra-config-2.0 + else + if test "x$srcdir" = "x"; then + idzebrasrcdir=. + else + idzebrasrcdir=$srcdir + fi + for dir in ${idzebrasrcdir}/../idzebra* ${idzebrasrcdir}/../idzebra ../idzebra* ../zebra; do + if test -d $dir; then + conf=$dir/idzebra-config-2.0 + if test -r $conf; then + idzebraconfig=$conf + fi + fi + done + if test "x$idzebraconfig" = "xNONE"; then + AC_PATH_PROG(idzebraconfig, idzebra-config-2.0, NONE) + fi + fi + AC_MSG_CHECKING(for idzebra) + if $idzebraconfig --version >/dev/null 2>&1; then + IDZEBRA_LIBS=`$idzebraconfig --libs $1` + IDZEBRA_LALIBS=`$idzebraconfig --lalibs $1` + IDZEBRA_CFLAGS=`$idzebraconfig --cflags $1` + IDZEBRA_VERSION=`$idzebraconfig --version` + AC_MSG_RESULT([$idzebraconfig]) + else + AC_MSG_RESULT(Not found) + IDZEBRA_VERSION=NONE + fi + if test "X$IDZEBRA_VERSION" != "XNONE"; then + AC_MSG_CHECKING([for idzebra version]) + AC_MSG_RESULT([$IDZEBRA_VERSION]) + if test "$2"; then + have_idzebra_version=`echo "$IDZEBRA_VERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` + req_idzebra_version=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` + if test "$have_idzebra_version" -lt "$req_idzebra_version"; then + AC_MSG_ERROR([$IDZEBRA_VERSION. Requires idzebra $2 or later]) + fi + fi + fi +]) + diff --git a/idzebra.m4 b/idzebra.m4 deleted file mode 100644 index 5ebe9b3..0000000 --- a/idzebra.m4 +++ /dev/null @@ -1,57 +0,0 @@ -## $Id: idzebra.m4,v 1.2 2006-03-30 18:05:24 adam Exp $ -## -# Use this m4 function for autoconf if you use ID Zebra in your own -# configure script. - -AC_DEFUN([IDZEBRA_INIT], -[ - AC_SUBST(IDZEBRA_LIBS) - AC_SUBST(IDZEBRA_LALIBS) - AC_SUBST(IDZEBRA_CFLAGS) - AC_SUBST(IDZEBRA_VERSION) - idzebraconfig=NONE - idzebrapath=NONE - AC_ARG_WITH(idzebra, [ --with-idzebra=DIR use idzebra-config in DIR (example /home/idzebra-1.4.0)], [idzebrapath=$withval]) - if test "x$idzebrapath" != "xNONE"; then - idzebraconfig=$idzebrapath/idzebra-config - else - if test "x$srcdir" = "x"; then - idzebrasrcdir=. - else - idzebrasrcdir=$srcdir - fi - for i in ${idzebrasrcdir}/../idzebra* ${idzebrasrcdir}/../idzebra ../idzebra* ../zebra; do - if test -d $i; then - if test -r $i/idzebra-config; then - idzebraconfig=$i/idzebra-config - fi - fi - done - if test "x$idzebraconfig" = "xNONE"; then - AC_PATH_PROG(idzebraconfig, idzebra-config, NONE) - fi - fi - AC_MSG_CHECKING(for idzebra) - if $idzebraconfig --version >/dev/null 2>&1; then - IDZEBRA_LIBS=`$idzebraconfig --libs $1` - IDZEBRA_LALIBS=`$idzebraconfig --lalibs $1` - IDZEBRA_CFLAGS=`$idzebraconfig --cflags $1` - IDZEBRA_VERSION=`$idzebraconfig --version` - AC_MSG_RESULT([$idzebraconfig]) - else - AC_MSG_RESULT(Not found) - IDZEBRA_VERSION=NONE - fi - if test "X$IDZEBRA_VERSION" != "XNONE"; then - AC_MSG_CHECKING([for idzebra version]) - AC_MSG_RESULT([$IDZEBRA_VERSION]) - if test "$2"; then - have_idzebra_version=`echo "$IDZEBRA_VERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` - req_idzebra_version=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` - if test "$have_idzebra_version" -lt "$req_idzebra_version"; then - AC_MSG_ERROR([$IDZEBRA_VERSION. Requires idzebra $2 or later]) - fi - fi - fi -]) -