• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl AX_POPT_CONST - check popt prototype
2AC_DEFUN([AX_POPT_CONST],
3[
4AC_MSG_CHECKING([popt prototype])
5SAVE_CXXFLAGS=$CXXFLAGS
6CXXFLAGS="-Werror $CXXFLAGS"
7AC_TRY_COMPILE([#include <popt.h>],
8[
9int c; char **v;
10poptGetContext(0, c, v, 0, 0);
11],
12AC_MSG_RESULT([takes char **]);,
13AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **]))
14CXXFLAGS="$SAVE_CXXFLAGS"
15]
16)
17