Check for libpopt 1.7 or greater.

This commit is contained in:
rocky
2004-02-25 01:59:17 +00:00
parent d2831fa851
commit 89fcb4794c

View File

@@ -1,5 +1,5 @@
# Configure paths for libpopt, based on m4's part of gnome # Configure paths for libpopt, based on m4's part of gnome
# (c) 2002 Herbert Valerio Riedel # (c) 2002, 2004 Herbert Valerio Riedel
dnl AM_PATH_LIBPOPT([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl AM_PATH_LIBPOPT([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl Test for libpopt, sets LIBPOPT_{CFLAGS,LIBS} dnl Test for libpopt, sets LIBPOPT_{CFLAGS,LIBS}
@@ -34,9 +34,12 @@ dnl now check whether the installed libpopt is usable
int int
main(int argc, const char *argv[]) main(int argc, const char *argv[])
{ {
char *s;
const struct poptOption options[] = { const struct poptOption options[] = {
POPT_AUTOHELP POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 } { NULL, 0, 0, NULL, 0, NULL, NULL },
{"foo", 'f', POPT_ARG_STRING|POPT_ARGFLAG_OPTIONAL, &s, NULL,
"test doc", "FILE"},
}; };
poptContext context = poptGetContext("popt-test", argc, argv, options, 0); poptContext context = poptGetContext("popt-test", argc, argv, options, 0);
@@ -54,7 +57,7 @@ dnl handle test result
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1]) ifelse([$1], , :, [$1])
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no or not new enough - need libpopt 1.7 or greater)
LIBPOPT_CFLAGS="" LIBPOPT_CFLAGS=""
LIBPOPT_LIBS="" LIBPOPT_LIBS=""
ifelse([$2], , :, [$2]) ifelse([$2], , :, [$2])