Commit 24581a12 24581a1282b8efcf83f2b2921690fe5c7bdd336f by Sergey Poznyakoff

Check if program_invocation_.*name are declared and/or defined.

1 parent 439c107f
...@@ -187,7 +187,29 @@ dnl Check for libraries ...@@ -187,7 +187,29 @@ dnl Check for libraries
187 AC_CHECK_FUNCS(argp_parse, :, 187 AC_CHECK_FUNCS(argp_parse, :,
188 [LIBOBJS="$LIBOBJS argp-ba.o argp-eexst.o argp-fmtstream.o \ 188 [LIBOBJS="$LIBOBJS argp-ba.o argp-eexst.o argp-fmtstream.o \
189 argp-fs-xinl.o argp-help.o argp-parse.o argp-pv.o \ 189 argp-fs-xinl.o argp-help.o argp-parse.o argp-pv.o \
190 argp-pvh.o argp-xinl.o pin.o"]) 190 argp-pvh.o argp-xinl.o"])
191
192 AC_MSG_CHECKING(whether extern program_invocation_name is present)
193 AC_TRY_COMPILE([#include <argp.h>
194 #include <errno.h>],
195 [ program_invocation_name = "test"; ],
196 [AC_DEFINE(PROGRAM_INVOCATION_NAME_DECLARED)
197 AC_MSG_RESULT(yes)],
198 [AC_MSG_RESULT(no)])
199
200
201 AC_MSG_CHECKING(whether program_invocation_name is declared)
202 AC_TRY_COMPILE([#include <argp.h>
203 #include <errno.h>],
204 [
205 #ifndef PROGRAM_INVOCATION_NAME_DECLARED
206 extern char *program_invocation_name;
207 #endif
208 program_invocation_name = "test";
209 ],
210 [AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME)
211 AC_MSG_RESULT(yes)],
212 [AC_MSG_RESULT(no)])
191 213
192 AC_CHECK_FUNCS(_obstack_begin, 214 AC_CHECK_FUNCS(_obstack_begin,
193 [AC_DEFINE(HAVE_OBSTACK)], 215 [AC_DEFINE(HAVE_OBSTACK)],
...@@ -387,5 +409,5 @@ AC_OUTPUT(Makefile mailutils.spec ...@@ -387,5 +409,5 @@ AC_OUTPUT(Makefile mailutils.spec
387 MySql/Makefile 409 MySql/Makefile
388 comsat/Makefile 410 comsat/Makefile
389 mail.local/Makefile 411 mail.local/Makefile
390 mh/Makefile 412 dotlock/Makefile
391 dotlock/Makefile) 413 )
......