Project

General

Profile

Download (1.42 KB) Statistics
| Branch: | Tag: | Revision:
1
AC_INIT([libosmosdr],
2
        m4_esyscmd([./git-version-gen .tarball-version]),
3
        [osmocom-sdr@lists.osmocom.org])
4

    
5
AM_INIT_AUTOMAKE([dist-bzip2])
6

    
7
dnl kernel style compile messages
8
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9

    
10
dnl checks for programs
11
AC_PROG_MAKE_SET
12
AC_PROG_CC
13
AC_PROG_INSTALL
14
LT_INIT
15
AC_PROG_LIBTOOL
16

    
17
PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0)
18
LIBS="$LIBS $LIBUSB_LIBS"
19
CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
20

    
21
AC_PATH_PROG(DOXYGEN,doxygen,false)
22
AM_CONDITIONAL(HAVE_DOXYGEN, test $DOXYGEN != false)
23

    
24
AC_CONFIG_MACRO_DIR([m4])
25

    
26
dnl checks for header files
27
AC_HEADER_STDC
28
AC_CHECK_HEADERS(sys/types.h)
29

    
30
# pc variables
31
AC_SUBST(OSMOSDR_PC_LIBS,["$LIBS"])
32
AC_SUBST(OSMOSDR_PC_CFLAGS,["$CFLAGS"])
33

    
34
# The following test is taken from WebKit's webkit.m4
35
saved_CFLAGS="$CFLAGS"
36
CFLAGS="$CFLAGS -fvisibility=hidden "
37
AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
38
AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
39
    [ AC_MSG_RESULT([yes])
40
      SYMBOL_VISIBILITY="-fvisibility=hidden"],
41
      AC_MSG_RESULT([no]))
42
CFLAGS="$saved_CFLAGS"
43
AC_SUBST(SYMBOL_VISIBILITY)
44

    
45
AC_MSG_CHECKING(whether compiler understands -Wall)
46
old_CFLAGS="$CFLAGS"
47
CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused -Wsign-compare"
48
AC_TRY_COMPILE([],[],
49
  AC_MSG_RESULT(yes),
50
  AC_MSG_RESULT(no)
51
  CFLAGS="$old_CFLAGS")
52

    
53
dnl Generate the output
54
AM_CONFIG_HEADER(config.h)
55

    
56
AC_OUTPUT(
57
	libosmosdr.pc
58
	include/Makefile
59
	src/Makefile
60
	Makefile
61
	Doxyfile
62
)
(8-8/11)
Add picture from clipboard (Maximum size: 48.8 MB)