Statistics
| Branch: | Revision:

napa-baselibs / configure.ac @ 5f3adef4

History | View | Annotate | Download (2.35 KB)

1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT([GRAPES], [0.1], [tivadar.szemethy@netvisor.hu])
3
AC_CONFIG_AUX_DIR(config)
4
AC_CONFIG_SRCDIR(tests/peer/peer.c)
5
AC_CONFIG_MACRO_DIR(m4)
6

    
7
AM_INIT_AUTOMAKE
8

    
9
AC_PROG_CC
10
AC_PROG_CXX
11
#AC_PROG_LIBTOOL
12
AC_PROG_RANLIB
13
AC_LANG_C
14

    
15
AC_CHECK_HEADER(netdb.h)
16
if test "$ac_cv_header_netdb_h" == no
17
then
18
	AC_MSG_ERROR([netdb.h is missing, unable to continue])
19
	exit -1
20
fi
21

    
22
if test "$ac_cv_header_sys_types_h" == no
23
then
24
	AC_MSG_ERROR([sys/types.h is missing, unable to continue])
25
	exit -1
26
fi
27

    
28
if test "$ac_cv_header_stdbool_h" == no
29
then
30
	AC_MSG_ERROR([stdbool.h is missing, unable to continue])
31
	exit -1
32
fi
33

    
34

    
35
AC_ARG_WITH(libevent2, [  --with-libevent2=libevent2_dir use libevent2 in dir])
36
if test "$with_libevent2" == "yes"
37
then
38
	AC_MSG_ERROR([missing directory specification after --libevent2])
39
	exit -1
40
fi
41
if test -d "$with_libevent2"
42
then
43
	CFLAGS="$CFLAGS -I$with_libevent2/include"
44
	CPPFLAGS="$CPPFLAGS -I$with_libevent2/include"
45
	LDFLAGS="$LDFLAGS -L$with_libevent2/lib"
46
fi
47

    
48
AC_CHECK_HEADER(event2/util.h)
49
if test "$ac_cv_header_libevent_h" == no
50
then
51
	AC_MSG_ERROR([libevent2 seems to be missing, unable to continue])
52
	exit -1
53
fi
54

    
55
AC_CHECK_LIB(event, event_init)
56
if test $ac_cv_lib_event_event_init == no
57
then
58
	AC_MSG_ERROR([libevent2 seems to be missing, unable to continue])
59
	exit -1
60
fi
61

    
62
AC_ARG_WITH(libconfuse, [  --with-libconfuse=libconfuse_dir use libconfuse in dir])
63
if test "$with_libconfuse" == "yes"
64
then
65
	AC_MSG_ERROR([missing directory specification after --libconfuse])
66
	exit -1
67
fi
68

    
69
if test -d "$with_libconfuse"
70
then
71
	CFLAGS="$CFLAGS -I$with_libconfuse/include"
72
	CPPFLAGS="$CPPFLAGS -I$with_libconfuse/include"
73
	LDFLAGS="$LDFLAGS -L$with_libconfuse/lib"
74
fi
75
AC_CHECK_HEADER(confuse.h)
76
if test "$ac_cv_header_libconfuse_h" == no
77
then
78
	AC_MSG_ERROR([libconfuse seems to be missing, unable to continue])
79
	exit -1
80
fi
81
	
82
AC_CHECK_LIB(confuse, cfg_init)
83
if test $ac_cv_lib_confuse_cfg_init == no
84
then
85
	AC_MSG_ERROR([libconfuse seems to be missing, unable to continue])
86
	exit -1
87
fi
88

    
89
AC_OUTPUT( [ Makefile \
90
	common/Makefile \
91
	dclog/Makefile \
92
	monl/Makefile rep/Makefile \
93
	tests/Makefile \
94
	tests/log/Makefile \
95
	tests/RepoClient/Makefile \
96
	tests/MonTest/Makefile \
97
	tests/MonTestDist/Makefile
98
	tests/peer/Makefile \
99
	tests/neighborlist/Makefile \
100
	tests/Broadcaster/Makefile \
101
	tests/nvtest1/Makefile \
102
	tests/nvtest2/Makefile ] )
103