| 1 | dnl test for libt2n and libt2n-codegen |
| 2 | dnl LIBT2N(VERSION, action-if, action-not) |
| 3 | AC_DEFUN([LIBT2N_CHECK], |
| 4 | [ |
| 5 | PKG_CHECK_MODULES(LIBT2N, [$1], [$2], [$3]) |
| 6 | LIBT2N_CODEGEN=`$PKG_CONFIG --variable libt2n_codegen libt2n` |
| 7 | LIBT2N_DATADIR=`$PKG_CONFIG --variable libt2n_datadir libt2n` |
| 8 | LIBT2N_CLIENT_PCTEMPLATE="$LIBT2N_DATADIR/clientlib.pc.in" |
| 9 | AC_SUBST(LIBT2N_CODEGEN) |
| 10 | AC_SUBST(LIBT2N_CLIENT_PCTEMPLATE) |
| 11 | |
| 12 | dnl newer automake versions do not allow to use += on undefined variables |
| 13 | dnl but we want to use += in codegen.make (s.a. examples-codegen/example1) |
| 14 | dnl as workaround we always define them |
| 15 | dnl see also: |
| 16 | dnl automake ml: subject: "automake conditional append" |
| 17 | dnl http://sourceware.org/ml/automake/2005-01/msg00019.html |
| 18 | dnl |
| 19 | dnl Note: |
| 20 | dnl if you update from libt2n 0.1 to 0.2 |
| 21 | dnl you must take care to pick up the right libt2n.m4 |
| 22 | |
| 23 | AC_SUBST([include_HEADERS], ['']) |
| 24 | AC_SUBST([BUILT_SOURCES], ['']) |
| 25 | AC_SUBST([CLEANFILES], ['']) |
| 26 | AC_SUBST([DISTCLEANFILES], ['']) |
| 27 | AC_SUBST([EXTRA_DIST], ['']) |
| 28 | ]) |