Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 81 lines (70 sloc) 1.965 kB
3df0820 @rmn64k Indicate that btpd has moved past 0.13.
rmn64k authored
1 AC_INIT(btpd, 0.13+, btpd@murmeldjur.se)
dd0d462 @rmn64k Import btpd-0.1.
rmn64k authored
2
50a3135 @rmn64k Update build scripts for recent btpd changes. Also use only one makef…
rmn64k authored
3 AM_INIT_AUTOMAKE([foreign subdir-objects])
dd0d462 @rmn64k Import btpd-0.1.
rmn64k authored
4
50a3135 @rmn64k Update build scripts for recent btpd changes. Also use only one makef…
rmn64k authored
5 AC_CONFIG_FILES([Makefile])
dd0d462 @rmn64k Import btpd-0.1.
rmn64k authored
6
7 AC_PROG_CC
50a3135 @rmn64k Update build scripts for recent btpd changes. Also use only one makef…
rmn64k authored
8 AC_PROG_CC_C_O
dd0d462 @rmn64k Import btpd-0.1.
rmn64k authored
9 AC_PROG_RANLIB
10
7dedb28 @rmn64k Put the ACX_PTHREAD macro from the Autoconf macro archive in acinclud…
rmn64k authored
11 AC_ARG_WITH(openssl,
12 [ --with-openssl=dir use openssl installed in dir],
b47b55b @rmn64k Use the more compatible -R flag instead of -rpath when linking.
rmn64k authored
13 [
14 AC_SUBST(openssl_LDFLAGS,["-L${withval}/lib -Wl,-R,${withval}/lib"])
15 AC_SUBST(openssl_CPPFLAGS,"-I${withval}/include")
16 ])
50a3135 @rmn64k Update build scripts for recent btpd changes. Also use only one makef…
rmn64k authored
17
18 AC_ARG_WITH(evloop-method,
19 [ --with-evloop-method select evloop method (epoll,poll,kqueue)],
20 evloop_methods=$withval,
21 evloop_methods="epoll kqueue poll")
22
23 AC_SEARCH_LIBS(clock_gettime, rt,
24 AC_SUBST(CLOCKLIB, $LIBS)
25 LIBS=""
26 ,
27 echo btpd needs clock_gettime.
28 exit 1)
29
30 echo -n "checking whether compiler accepts -Wno-pointer-sign... "
31 old_CFLAGS=$CFLAGS
32 CFLAGS="-Wno-pointer-sign"
33 AC_COMPILE_IFELSE(int main(void) { return 0; },
34 AC_SUBST(WARNNPS,"-Wno-pointer-sign")
35 echo yes
36 ,
37 echo no)
38 CFLAGS=$old_CFLAGS
aecad43 @rmn64k Remove -Wall -Werror from the default CFLAGS.
rmn64k authored
39
dd0d462 @rmn64k Import btpd-0.1.
rmn64k authored
40 old_LDFLAGS="$LDFLAGS"
41 LDFLAGS="$LDFLAGS $openssl_LDFLAGS"
50a3135 @rmn64k Update build scripts for recent btpd changes. Also use only one makef…
rmn64k authored
42 AC_CHECK_LIB(crypto, SHA1_Final,, echo "btpd needs openssl's libraries and headers."; exit 1)
dd0d462 @rmn64k Import btpd-0.1.
rmn64k authored
43 LDFLAGS=$old_LDFLAGS
50a3135 @rmn64k Update build scripts for recent btpd changes. Also use only one makef…
rmn64k authored
44 LIBS=""
dd0d462 @rmn64k Import btpd-0.1.
rmn64k authored
45
50a3135 @rmn64k Update build scripts for recent btpd changes. Also use only one makef…
rmn64k authored
46 for m in $evloop_methods; do
47 case $m in
48 epoll)
49 AC_CHECK_FUNC(epoll_wait,[
50 AC_SUBST(EVLOOP_IMPL,"evloop/epoll.${OBJEXT}")
51 AC_SUBST(EVLOOP_METHOD,EVLOOP_EPOLL)
52 break],)
53 ;;
54 kqueue)
55 AC_CHECK_FUNC(kqueue,[
56 AC_SUBST(EVLOOP_IMPL,"evloop/kqueue.${OBJEXT}")
57 AC_SUBST(EVLOOP_METHOD,EVLOOP_KQUEUE)
58 break],)
59 ;;
60 poll)
61 AC_CHECK_FUNC(poll,[
62 AC_SUBST(EVLOOP_IMPL,"evloop/poll.${OBJEXT}")
63 AC_SUBST(EVLOOP_METHOD,EVLOOP_POLL)
64 break],)
65 break
66 ;;
67 *)
68 echo "$m is not a valid evloop method. See --help."
69 exit 1
70 ;;
71 esac
72 done
73 if test x$EVLOOP_METHOD == x; then
74 echo "no suitable evloop method found."
75 exit 1
76 else
77 echo selected evloop method $EVLOOP_METHOD.
78 fi
4dd1bad @rmn64k * Indicate that this is not version 0.1 any more.
rmn64k authored
79
dd0d462 @rmn64k Import btpd-0.1.
rmn64k authored
80 AC_OUTPUT
Something went wrong with that request. Please try again.