File: acinclude.m4

package info (click to toggle)
logjam 4.5.3-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,896 kB
  • ctags: 2,702
  • sloc: ansic: 23,327; sh: 8,393; makefile: 292
file content (32 lines) | stat: -rw-r--r-- 793 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
AC_DEFUN([LJ_PKG_ARG_WITH], [
  HAVE_$2=no

  AC_ARG_WITH($1, [$3], , [with_$1=yes])

  if test -z "$PKG_CONFIG"; then
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  fi

  if test "$PKG_CONFIG" = "no" ; then
    echo "*** The pkg-config script could not be found. Make sure it is"
    echo "*** in your path, or set the PKG_CONFIG environment variable"
    echo "*** to the full path to pkg-config."
    echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
  else
    if test "$with_$1" = "yes"; then
      AC_MSG_CHECKING(for $4)
      if $PKG_CONFIG --exists "$4" ; then
	AC_MSG_RESULT(yes)
	HAVE_$2=yes
	AC_DEFINE(HAVE_$2,1,[do we have $1?])
	MODULES="$MODULES $4"
      else
	AC_MSG_RESULT(not found)
	with_$1=no
      fi
    fi
  fi

])

dnl vim: set sw=2 :