2 m4_esyscmd([./git-version-gen .tarball-version]),
3 [rtl_433@googlegroups.com])
5 AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
7 dnl kernel style compile messages
8 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
10 dnl checks for programs
17 PKG_CHECK_MODULES(LIBRTLSDR, librtlsdr)
18 LIBS="$LIBS $LIBRTLSDR_LIBS"
19 CFLAGS="$CFLAGS $LIBRTLSDR_CFLAGS"
21 AC_PATH_PROG(DOXYGEN,doxygen,false)
22 AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
24 AC_CONFIG_MACRO_DIR([m4])
26 dnl checks for header files
28 AC_CHECK_HEADERS(sys/types.h)
31 AC_SUBST(RTLSDR_PC_LIBS,["$LIBS"])
32 AC_SUBST(RTLSDR_PC_CFLAGS,["$CFLAGS"])
34 dnl checks for required libraries
36 # The following test is taken from WebKit's webkit.m4
37 saved_CFLAGS="$CFLAGS"
38 CFLAGS="$CFLAGS -fvisibility=hidden "
39 AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
40 AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
41 [ AC_MSG_RESULT([yes])
42 SYMBOL_VISIBILITY="-fvisibility=hidden"],
44 CFLAGS="$saved_CFLAGS"
45 AC_SUBST(SYMBOL_VISIBILITY)
47 AC_MSG_CHECKING(whether compiler understands -Wall)
49 CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused -Wsign-compare"
55 dnl Generate the output
56 AM_CONFIG_HEADER(config.h)