1# liboptschk.m4 serial 1 (autogen - 5.7.3)
2dnl copyright (c) 2005-2009 by Bruce Korb - all rights reserved
3dnl
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl Time-stamp:        "2009-07-22 18:53:27 bkorb"
9
10dnl This file can can be used in projects which are not available under
11dnl the GNU General Public License or the GNU Library General Public
12dnl License but which still want to provide support for the GNU gettext
13dnl functionality.
14dnl Please note that the actual code of the GNU gettext library is covered
15dnl by the GNU Library General Public License, and the rest of the GNU
16dnl gettext package package is covered by the GNU General Public License.
17dnl They are *not* in the public domain.
18
19dnl Authors:
20dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
21dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
22
23AC_PREREQ(2.50)
24
25AC_DEFUN([ag_FIND_LIBOPTS],
26    [if test "X${ac_cv_header_autoopts_options_h}" == Xno
27    then
28      :
29    else
30      f=`autoopts-config cflags` 2>/dev/null
31      test X"${f}" = X && f=`libopts-config cflags` 2>/dev/null
32      if test X"${f}" = X
33      then
34        :
35      else
36        AC_DEFINE([HAVE_LIBOPTS],[1],[define if we can find libopts])
37        CFLAGS="${CFLAGS} ${f}"
38        f=`autoopts-config ldflags` 2>/dev/null
39        test X"${f}" = X && f=`libopts-config ldflags` 2>/dev/null
40        LIBS="${LIBS} ${f}"
41      fi
42    fi])
43