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
18 PKG_CHECK_MODULES(LIBRTLSDR, librtlsdr)
19 LIBS="$LIBS $LIBRTLSDR_LIBS"
20 CFLAGS="$CFLAGS $LIBRTLSDR_CFLAGS"
22 AC_PATH_PROG(DOXYGEN,doxygen,false)
23 AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
25 AC_CONFIG_MACRO_DIR([m4])
27 dnl checks for header files
29 AC_CHECK_HEADERS(sys/types.h)
32 AC_SUBST(RTLSDR_PC_LIBS,["$LIBS"])
33 AC_SUBST(RTLSDR_PC_CFLAGS,["$CFLAGS"])
35 dnl checks for required libraries
37 # The following test is taken from WebKit's webkit.m4
38 saved_CFLAGS="$CFLAGS"
39 CFLAGS="$CFLAGS -fvisibility=hidden "
40 AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
41 AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
42 [ AC_MSG_RESULT([yes])
43 SYMBOL_VISIBILITY="-fvisibility=hidden"],
45 CFLAGS="$saved_CFLAGS"
46 AC_SUBST(SYMBOL_VISIBILITY)
48 AC_MSG_CHECKING(whether compiler understands -Wall)
50 CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused -Wsign-compare"
56 dnl Generate the output
57 AM_CONFIG_HEADER(config.h)