source: web/old/remctl-2.14/m4/gput.m4 @ f6f3e91

web
Last change on this file since f6f3e91 was f6f3e91, checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago

Preserve directory hierarchy (not sure what happened to it)

  • Property mode set to 100644
File size: 2.3 KB
Line 
1dnl gput.m4 -- Find the compiler and linker flags for GPUT.
2dnl
3dnl Provides the macro RRA_LIB_GPUT, which finds the compiler and linker flags
4dnl for linking with GPUT libraries (an authorization system developed at
5dnl Carnegie Mellon University) and sets the substitution variables
6dnl GPUT_CPPFLAGS, GPUT_LDFLAGS, and GPUT_LIBS.  Provides the --with-gput,
7dnl --with-gput-lib, and --with-gput-include configure options and defines
8dnl HAVE_GPUT if the library is available.
9dnl
10dnl Depends on RRA_SET_LDFLAGS.
11dnl
12dnl Written by Russ Allbery <rra@stanford.edu>
13dnl Copyright 2008 Board of Trustees, Leland Stanford Jr. University
14dnl
15dnl See LICENSE for licensing terms.
16
17AC_DEFUN([RRA_LIB_GPUT],
18[GPUT_CPPFLAGS=
19 GPUT_LDFLAGS=
20 GPUT_LIBS=
21 AC_SUBST([GPUT_CPPFLAGS])
22 AC_SUBST([GPUT_LDFLAGS])
23 AC_SUBST([GPUT_LIBS])
24 rra_with_gput=
25
26 AC_ARG_WITH([gput],
27    [AC_HELP_STRING([--with-gput=DIR],
28        [Location of CMU GPUT headers and libraries])],
29    [rra_with_gput=yes
30     AS_IF([test x"$withval" = xno],
31        [rra_with_gput=no],
32        [AS_IF([test x"$withval" != xyes],
33            [GPUT_CPPFLAGS="-I$withval/include"
34             RRA_SET_LDFLAGS([GPUT_LDFLAGS], [$withval])])])])
35 AC_ARG_WITH([gput-include],
36    [AC_HELP_STRING([--with-gput-include=DIR],
37        [Location of CMU GPUT headers])],
38    [AS_IF([test x"$withval" = xyes || test x"$withval" = xno],
39        [AC_MSG_ERROR([no argument given for --with-gput-include])])
40     rra_with_gput=yes
41     GPUT_CPPFLAGS="-I$withval"])
42 AC_ARG_WITH([gput-lib],
43    [AC_HELP_STRING([--with-gput-lib=DIR], [Location of CMU GPUT libraries])],
44    [AS_IF([test x"$withval" = xyes || test x"$withval" = xno],
45        [AC_MSG_ERROR([no argument given for --with-gput-lib])])
46     rra_with_gput=yes
47     GPUT_LDFLAGS="-L$withval"])
48
49 rra_save_CPPFLAGS="$CPPFLAGS"
50 rra_save_LDFLAGS="$LDFLAGS"
51 CPPFLAGS="$GPUT_CPPFLAGS $CPPFLAGS"
52 LDFLAGS="$GPUT_LDFLAGS $LDFLAGS"
53 AS_IF([test x"$rra_with_gput" != xno],
54    [AC_CHECK_HEADER([gput.h],
55        [AC_CHECK_LIB([gput], [gput_open],
56            [AC_DEFINE([HAVE_GPUT], 1,
57                [Define to 1 if the CMU GPUT library is present])
58             GPUT_LIBS=-lgput],
59            [AS_IF([test x"$rra_with_gput" = xyes],
60                [AC_MSG_ERROR([GPUT library not found])])])],
61        [AS_IF([test x"$rra_with_gput" = xyes],
62            [AC_MSG_ERROR([GPUT header gput.h not found])])])])])
Note: See TracBrowser for help on using the repository browser.