aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-support.m4
blob: 381bc98ca828004b59c106b6d4bd2cbbeda755b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
dnl libsupport stuff
dnl GNOME_SUPPORT_CHECKS
AC_DEFUN([GNOME_SUPPORT_CHECKS],[
  AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
  AC_CHECK_FUNCS(argp_parse,,LIBOBJS="$LIBOBJS argp-ba.o argp-eexst.o argp-fmtstream.o argp-fs-xinl.o argp-help.o argp-parse.o argp-pv.o argp-xinl.o")
  AC_TRY_LINK([#include <errno.h>],[
    char *foo = program_invocation_short_name], [
    AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME)])
  AC_TRY_LINK([#include <errno.h>],[
    char *foo = program_invocation_name], [
    AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME)])
  AC_REPLACE_FUNCS(strtok_r strcasecmp strndup)
  AC_SUBST(LIBOBJS)
])