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