fix check for presence of ao subdevice
[comedilib.git] / m4 / as-libtool.m4
1 dnl as-libtool.m4 0.0.2
2 dnl autostars m4 macro for libtool versioning
3 dnl thomas@apestaart.org
4 dnl
5 dnl AS_LIBTOOL(PREFIX, CURRENT, REVISION, AGE, USE_RELEASE)
6 dnl example
7 dnl AS_VERSION(GST, 2, 0, 0)
8 dnl
9 dnl this macro
10 dnl - defines [$PREFIX]_CURRENT, REVISION AND AGE
11 dnl - defines [$PREFIX]_LIBVERSION
12 dnl - defines [$PREFIX]_LT_LDFLAGS to set versioning
13 dnl - AC_SUBST's them all
14 dnl
15 dnl if USE_RELEASE = yes, then add a -release option to the LDFLAGS
16 dnl with the (pre-defined) [$PREFIX]_VERSION
17 dnl then use [$PREFIX]_LT_LDFLAGS in the relevant Makefile.am's
18
19 AC_DEFUN([AS_LIBTOOL],
20 [
21   [$1]_CURRENT=[$2]
22   [$1]_REVISION=[$3]
23   [$1]_AGE=[$4]
24   [$1]_LIBVERSION=[$2]:[$3]:[$4]
25   AC_SUBST([$1]_CURRENT)
26   AC_SUBST([$1]_REVISION)
27   AC_SUBST([$1]_AGE)
28   AC_SUBST([$1]_LIBVERSION)
29
30 dnl  [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -version-info $[$1]_LIBVERSION"
31   if test ! -z "[$5]"
32   then
33     [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -release $[$1]_VERSION"
34   fi
35   AC_SUBST([$1]_LT_LDFLAGS)
36
37   AC_LIBTOOL_DLOPEN
38   AC_PROG_LIBTOOL
39 ])