Code

screen: make cols and rows local
[ncmpc.git] / m4 / mpd_with_flags.m4
1 dnl Run code with the specified CFLAGS/CXXFLAGS and LIBS appended.
2 dnl Restores the old values afterwards.
3 dnl
4 dnl Parameters: cflags, libs, code
5 AC_DEFUN([MPD_WITH_FLAGS], [
6         ac_save_CFLAGS="$[]CFLAGS"
7         ac_save_CXXFLAGS="$[]CXXFLAGS"
8         ac_save_LIBS="$[]LIBS"
9         CFLAGS="$[]CFLAGS $1"
10         CXXFLAGS="$[]CXXFLAGS $1"
11         LIBS="$[]LIBS $2"
12         $3
13         CFLAGS="$[]ac_save_CFLAGS"
14         CXXFLAGS="$[]ac_save_CXXFLAGS"
15         LIBS="$[]ac_save_LIBS"
16 ])
18 dnl Run code with the specified library's CFLAGS/CXXFLAGS and LIBS
19 dnl appended.  Restores the old values afterwards.
20 dnl
21 dnl Parameters: libname, code
22 AC_DEFUN([MPD_WITH_LIBRARY],
23         [MPD_WITH_FLAGS([$[]$1_CFLAGS], [$[]$1_LIBS], [$2])])