summaryrefslogtreecommitdiffabout
path: root/acinclude.m4
authorMichael Krelin <hacker@klever.net>2006-08-11 16:01:56 (UTC)
committer Michael Krelin <hacker@klever.net>2006-08-11 16:01:56 (UTC)
commit0c21a7a0d5b84dc6726462f0fbe51b8c32433262 (patch) (unidiff)
tree9df6334cb1a61efebe68f7bcef9aa119a823626a /acinclude.m4
parent9bcc235e575a95989a5903394c127accbeef2e0f (diff)
downloadmidillo-0.0.zip
midillo-0.0.tar.gz
midillo-0.0.tar.bz2
initial commit into repository0.0
Diffstat (limited to 'acinclude.m4') (more/less context) (ignore whitespace changes)
-rw-r--r--acinclude.m480
1 files changed, 80 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..ec2c50f
--- a/dev/null
+++ b/acinclude.m4
@@ -0,0 +1,80 @@
1dnl AC_WITH_PKGCONFIG([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
2dnl Outputs:
3dnl AC_SUBST: PKGCONFIG_PKGCONFIG PKGCONFIG_DIR
4dnl AM_CONDTIONAL: HAVE_PKGCONFIG
5AC_DEFUN([AC_WITH_PKGCONFIG],[
6 PKGCONFIG_PKGCONFIG=""
7 PKGCONFIG_DIR=""
8 HAVE_PKGCONFIG="no"
9 EXPLICIT_PKGCONFIGDIR="no"
10 test -z "${WANT_PKGCONFIG}" && WANT_PKGCONFIG=""
11 AC_PATH_PROG([PKGCONFIG_PKGCONFIG],[pkg-config],[false])
12 if test "${PKGCONFIG_PKGCONFIG}" != "false" ; then
13 AC_ARG_WITH([pkgconfigdir],
14 AC_HELP_STRING([--with-pkgconfigdir=dir],[Specify pkgconfig directory]),
15 [
16 if test "${withval}" = "no" ; then
17 WANT_PKGCONFIG="no"
18 else
19 PKGCONFIG_DIR="${withval}"
20 EXPLICIT_PKGCONFIGDIR="yes"
21 fi
22 ],[
23 AC_MSG_CHECKING([for pkgconfig directory])
24 PKGCONFIG_DIR="`${PKGCONFIG_PKGCONFIG} --debug 2>&1 | grep '^Scanning'| head -n 1 | cut -d\' -f2-|cut -d\' -f1`"
25 AC_MSG_RESULT([${PKGCONFIG_DIR}])
26 ]
27 )
28 if test -d "${PKGCONFIG_DIR}" ; then
29 HAVE_PKGCONFIG=yes
30 AC_SUBST([PKGCONFIG_PKGCONFIG])
31 AC_SUBST([PKGCONFIG_DIR])
32 else
33 AC_MSG_NOTICE([unexistent pkgconfig directory: ${PKGCONFIG_DIR}])
34 if test "${EXPLICIT_PKGCONFIGDIR}" = "yes" ; then
35 HAVE_PKGCONFIG=yes
36 AC_SUBST([PKGCONFIG_PKGCONFIG])
37 AC_SUBST([PKGCONFIG_DIR])
38 else
39 ifelse([$2], , :, [$2])
40 fi
41 fi
42 fi
43 AM_CONDITIONAL([HAVE_PKGCONFIG],[test "${HAVE_PKGCONFIG}" = "yes"])
44])
45
46dnl AC_WITH_DOXYGEN([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
47dnl Outputs:
48dnl AC_SUBST: DOXYGEN HAVE_DOXYGEN
49dnl AM_CONDTIONAL: HAVE_DOXYGEN
50AC_DEFUN([AC_WITH_DOXYGEN],[
51 HAVE_DOXYGEN="no"
52 AC_PATH_PROG([DOXYGEN],[doxygen],[false])
53 if test "${DOXYGEN}" = "false" ; then
54 ifelse([$2], , :, [$2])
55 else
56 HAVE_DOXYGEN="yes"
57 AC_SUBST([DOXYGEN])
58 $1
59 fi
60 AC_SUBST([HAVE_DOXYGEN])
61 AM_CONDITIONAL([HAVE_DOXYGEN],[test "${HAVE_DOXYGEN}" = "yes"])
62])
63
64dnl AC_WITH_DOT([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
65dnl Outputs:
66dnl AC_SUBST: DOT HAVE_DOT
67dnl AM_CONDITIONAL: HAVE_DOT
68AC_DEFUN([AC_WITH_DOT],[
69 HAVE_DOT="no"
70 AC_PATH_PROG([DOT],[dot],[false])
71 if test "${DOT}" = "false" ; then
72 ifelse([$2], , :, [$2])
73 else
74 HAVE_DOT="yes"
75 AC_SUBST([DOT])
76 $1
77 fi
78AC_SUBST([HAVE_DOT])
79 AM_CONDITIONAL([HAVE_DOT],[test "${HAVE_DOT}" = "yes"])
80])