configure.ac 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058
  1. ##
  2. ## Configure template file for Quagga.
  3. ## autoconf will generate configure script.
  4. ##
  5. ## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
  6. ## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
  7. ##
  8. AC_PREREQ(2.53)
  9. AC_INIT(quagga, 0.96.4, [bug-zebra@gnu.org])
  10. AC_CONFIG_SRCDIR(lib/zebra.h)
  11. AM_INIT_AUTOMAKE()
  12. AM_CONFIG_HEADER(config.h)
  13. dnl -----------------------------------
  14. dnl Get hostname and other information.
  15. dnl -----------------------------------
  16. AC_CANONICAL_HOST
  17. dnl ------------
  18. dnl Check CFLAGS
  19. dnl ------------
  20. AC_ARG_WITH(cflags,
  21. [ --with-cflags Set CFLAGS for use in compilation.])
  22. if test "x$with_cflags" != "x" ; then
  23. CFLAGS="$with_cflags" ; cflags_specified=yes ;
  24. elif test -n "$CFLAGS" ; then
  25. cflags_specified=yes ;
  26. fi
  27. dnl --------
  28. dnl Check CC
  29. dnl --------
  30. AC_PROG_CC
  31. dnl -----------------------------------------
  32. dnl If CLFAGS doesn\'t exist set default value
  33. dnl -----------------------------------------
  34. if test "x$cflags_specified" = "x" ; then
  35. CFLAGS="$CFLAGS -Wall"
  36. fi
  37. dnl --------------
  38. dnl Check programs
  39. dnl --------------
  40. AC_PROG_CPP
  41. AC_PROG_INSTALL
  42. AC_PROG_MAKE_SET
  43. AC_CHECK_TOOL(AR, ar)
  44. AC_CHECK_TOOL(RANLIB, ranlib, :)
  45. dnl ---------
  46. dnl AIX check
  47. dnl ---------
  48. AC_AIX
  49. dnl ----------------------
  50. dnl Packages configuration
  51. dnl ----------------------
  52. AC_ARG_ENABLE(vtysh,
  53. [ --enable-vtysh, Make integrated vty shell for Quagga])
  54. AC_ARG_ENABLE(ipv6,
  55. [ --disable-ipv6 turn off IPv6 related features and daemons])
  56. AC_ARG_ENABLE(zebra,
  57. [ --disable-zebra do not build zebra daemon])
  58. AC_ARG_ENABLE(bgpd,
  59. [ --disable-bgpd do not build bgpd])
  60. AC_ARG_ENABLE(ripd,
  61. [ --disable-ripd do not build ripd])
  62. AC_ARG_ENABLE(ripngd,
  63. [ --disable-ripngd do not build ripngd])
  64. AC_ARG_ENABLE(ospfd,
  65. [ --disable-ospfd do not build ospfd])
  66. AC_ARG_ENABLE(ospf6d,
  67. [ --disable-ospf6d do not build ospf6d])
  68. AC_ARG_ENABLE(bgp-announce,
  69. [ --disable-bgp-announce, turn off BGP route announcement])
  70. AC_ARG_ENABLE(netlink,
  71. [ --enable-netlink force to use Linux netlink interface])
  72. AC_ARG_ENABLE(broken-aliases,
  73. [ --enable-broken-aliases enable aliases as distinct interfaces for Linux 2.2.X])
  74. AC_ARG_ENABLE(snmp,
  75. [ --enable-snmp enable SNMP support])
  76. AC_ARG_WITH(libpam,
  77. [ --with-libpam use libpam for PAM support in vtysh])
  78. AC_ARG_ENABLE(tcp-zebra,
  79. [ --enable-tcp-zebra enable TCP/IP socket connection between zebra and protocol daemon])
  80. dnl Temporary option until OSPF NSSA implementation complete
  81. AC_ARG_ENABLE(nssa,
  82. [ --enable-nssa enable OSPF NSSA option])
  83. AC_ARG_ENABLE(opaque-lsa,
  84. [ --enable-opaque-lsa enable OSPF Opaque-LSA with OSPFAPI support (RFC2370)])
  85. AC_ARG_ENABLE(ospfapi,
  86. [ --disable-ospfapi do not build OSPFAPI to access the OSPF LSA Database,
  87. (this is the default if --enable-opaque-lsa is not set)])
  88. AC_ARG_ENABLE(ospfclient,
  89. [ --disable-ospfclient do not build OSPFAPI client for OSPFAPI,
  90. (this is the default if --disable-ospfapi is set)])
  91. AC_ARG_ENABLE(ospf-te,
  92. [ --enable-ospf-te enable Traffic Engineering Extension to OSPF])
  93. AC_ARG_ENABLE(multipath,
  94. [ --enable-multipath=ARG enable multipath function, ARG must be digit])
  95. AC_ARG_ENABLE(quagga_user,
  96. [ --enable-user=ARG user to run Quagga suite as (default quagga)])
  97. AC_ARG_ENABLE(quagga_group,
  98. [ --enable-group=ARG group to run Quagga suite as (default quagga)])
  99. AC_ARG_ENABLE(vty_group,
  100. [ --enable-vty-group=ARG set vty sockets to have specified group as owner])
  101. AC_ARG_ENABLE(rtadv,
  102. [ --enable-rtadv enable IPV6 router advertisement feature])
  103. if test "${enable_broken_aliases}" = "yes"; then
  104. if test "${enable_netlink}" = "yes"
  105. then
  106. echo "Sorry, you can't use netlink with broken aliases"
  107. exit 1
  108. fi
  109. AC_DEFINE(HAVE_BROKEN_ALIASES,,Broken Alias)
  110. enable_netlink=no
  111. fi
  112. if test "${enable_tcp_zebra}" = "yes"; then
  113. AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication)
  114. fi
  115. if test "${enable_nssa}" = "yes"; then
  116. AC_DEFINE(HAVE_NSSA,,OSPF NSSA)
  117. fi
  118. if test "${enable_opaque_lsa}" = "yes"; then
  119. AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
  120. fi
  121. if test "${enable_ospf_te}" = "yes"; then
  122. AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
  123. AC_DEFINE(HAVE_OSPF_TE,,OSPF TE)
  124. fi
  125. AC_MSG_CHECKING(Should zebra's RTADV be used)
  126. if test "${enable_rtadv}" = "yes"; then
  127. AC_MSG_RESULT(yes)
  128. AC_DEFINE(HAVE_RTADV,,Enable zebra IPv6 Routing Advertisements)
  129. else
  130. AC_MSG_RESULT(no)
  131. fi
  132. if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then
  133. enable_user="quagga"
  134. elif test "${enable_user}" = "no"; then
  135. enable_user="root"
  136. fi
  137. AC_DEFINE_UNQUOTED(QUAGGA_USER, "${enable_user}", Quagga User)
  138. if test "${enable_group}" = "yes" || test x"${enable_group}" = x""; then
  139. enable_group="quagga"
  140. elif test "${enable_group}" = "no"; then
  141. enable_group="root"
  142. fi
  143. AC_DEFINE_UNQUOTED(QUAGGA_GROUP, "${enable_group}", Quagga Group)
  144. if test x"${enable_vty_group}" = x"yes" ; then
  145. AC_MSG_ERROR([--enable-vty-group requires a group as argument, not yes])
  146. elif test x"${enable_vty_group}" != x""; then
  147. if test x"${enable_vty_group}" != x"no"; then
  148. AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group)
  149. fi
  150. fi
  151. changequote(, )dnl
  152. MULTIPATH_NUM=1
  153. case "${enable_multipath}" in
  154. [0-9]|[1-9][0-9])
  155. MULTIPATH_NUM="${enable_multipath}"
  156. ;;
  157. "")
  158. ;;
  159. *)
  160. echo "Please specify digit to --enable-multipath ARG."
  161. exit 1
  162. ;;
  163. esac
  164. changequote([, ])dnl
  165. AC_SUBST(MULTIPATH_NUM)
  166. dnl -------------------
  167. dnl Check header files.
  168. dnl -------------------
  169. AC_HEADER_STDC
  170. AC_CHECK_HEADERS([string.h stropts.h sys/conf.h sys/ksym.h sys/time.h \
  171. sys/times.h sys/select.h sys/sysctl.h sys/sockio.h \
  172. sys/types.h linux/version.h kvm.h netdb.h asm/types.h \
  173. libutil.h limits.h])
  174. AC_CHECK_HEADERS([sys/socket.h netinet/in.h net/if_dl.h \
  175. net/netopt.h inet/nd.h net/route.h net/if.h \
  176. net/if_var.h netinet/in_var.h])
  177. if test "x${enable_ipv6}" = "xyes"; then
  178. AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h netinet/icmp6.h \
  179. netinet6/in6_var.h netinet6/nd6.h])
  180. fi
  181. dnl if enable_ipv6
  182. dnl check some types
  183. AC_C_CONST
  184. dnl AC_TYPE_PID_T
  185. AC_TYPE_SIGNAL
  186. dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
  187. case "$host" in
  188. *-sunos5.6* | *-solaris2.6*)
  189. opsys=sol2-6
  190. AC_DEFINE(SUNOS_5,,SunOS 5)
  191. AC_CHECK_LIB(xnet, main)
  192. CURSES=-lcurses
  193. ;;
  194. *-sunos5* | *-solaris2*)
  195. AC_DEFINE(SUNOS_5,,SunOS 5)
  196. AC_CHECK_LIB(socket, main)
  197. AC_CHECK_LIB(nsl, main)
  198. CURSES=-lcurses
  199. ;;
  200. *-linux-*)
  201. opsys=gnu-linux
  202. AC_DEFINE(GNU_LINUX,,GNU Linux)
  203. ;;
  204. *-nec-sysv4*)
  205. AC_CHECK_LIB(nsl, gethostbyname)
  206. AC_CHECK_LIB(socket, socket)
  207. ;;
  208. *-freebsd3.2)
  209. AC_DEFINE(FREEBSD_32,,FreeBSD 3.2)
  210. ;;
  211. *-openbsd*)
  212. opsys=openbsd
  213. AC_DEFINE(OPEN_BSD,,OpenBSD)
  214. ;;
  215. *-bsdi*)
  216. opsys=bsdi
  217. OTHER_METHOD="mtu_kvm.o"
  218. AC_CHECK_LIB(kvm, main)
  219. ;;
  220. *-irix6.5)
  221. opsys=irix
  222. AC_DEFINE(IRIX_65,,IRIX 6.5)
  223. ;;
  224. esac
  225. dnl ---------------------
  226. dnl Integrated VTY option
  227. dnl ---------------------
  228. case "${enable_vtysh}" in
  229. "yes") VTYSH="vtysh";
  230. AC_DEFINE(VTYSH,,VTY shell)
  231. AC_CHECK_LIB(tinfo, tputs, , AC_CHECK_LIB(ncurses, tputs))
  232. AC_CHECK_LIB(readline, main)
  233. if test $ac_cv_lib_readline_main = no; then
  234. AC_MSG_ERROR([vtysh needs libreadline but was not found on your system.])
  235. fi
  236. AC_CHECK_HEADER(readline/history.h)
  237. if test $ac_cv_header_readline_history_h = no;then
  238. AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
  239. fi
  240. AC_CHECK_LIB(readline, rl_completion_matches)
  241. if test $ac_cv_lib_readline_rl_completion_matches = no; then
  242. AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
  243. fi
  244. ;;
  245. "no" ) VTYSH="";;
  246. * ) ;;
  247. esac
  248. dnl ----------
  249. dnl PAM module
  250. dnl ----------
  251. if test "$with_libpam" = "yes"; then
  252. AC_CHECK_HEADER(security/pam_misc.h)
  253. if test "$ac_cv_header_security_pam_misc_h" = yes; then
  254. AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
  255. AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
  256. pam_conv_func="misc_conv"
  257. fi
  258. AC_CHECK_HEADER(security/openpam.h)
  259. if test "$ac_cv_header_security_openpam_h" = yes; then
  260. AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
  261. AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
  262. pam_conv_func="openpam_ttyconv"
  263. fi
  264. if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then
  265. AC_MSG_WARN([*** pam support will not be built ***])
  266. with_libpam="no"
  267. fi
  268. fi
  269. if test "$with_libpam" = "yes"; then
  270. dnl took this test from proftpd's configure.in and suited to our needs
  271. dnl -------------------------------------------------------------------------
  272. dnl
  273. dnl This next check looks funky due to a linker problem with some versions
  274. dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library
  275. dnl omitted requiring libdl linking information. PAM-0.72 or better ships
  276. dnl with RedHat 6.2 and Debian 2.2 or better.
  277. AC_CHECK_LIB(pam, pam_start,
  278. [AC_CHECK_LIB(pam, $pam_conv_func,
  279. [AC_DEFINE(USE_PAM,,Use PAM for authentication)
  280. LIBPAM="-lpam"],
  281. [AC_DEFINE(USE_PAM,,Use PAM for authentication)
  282. LIBPAM="-lpam -lpam_misc"]
  283. )
  284. ],
  285. [AC_CHECK_LIB(pam, pam_end,
  286. [AC_CHECK_LIB(pam, $pam_conv_func,
  287. [AC_DEFINE(USE_PAM,,Use PAM for authentication)
  288. LIBPAM="-lpam -ldl"],
  289. [AC_DEFINE(USE_PAM,,Use PAM for authentication)
  290. LIBPAM="-lpam -ldl -lpam_misc"]
  291. )
  292. ],AC_MSG_WARN([*** pam support will not be built ***]),
  293. [-ldl])
  294. ]
  295. )
  296. fi
  297. AC_SUBST(LIBPAM)
  298. dnl -------------------------------
  299. dnl Endian-ness check
  300. dnl -------------------------------
  301. AC_WORDS_BIGENDIAN
  302. dnl -------------------------------
  303. dnl check the size in byte of the C
  304. dnl -------------------------------
  305. dnl AC_CHECK_SIZEOF(char)
  306. dnl AC_CHECK_SIZEOF(int)
  307. dnl AC_CHECK_SIZEOF(short)
  308. dnl AC_CHECK_SIZEOF(long)
  309. dnl ----------------------------
  310. dnl check existance of functions
  311. dnl ----------------------------
  312. AC_CHECK_FUNCS(memset memcpy strerror inet_aton daemon snprintf vsnprintf \
  313. strlcat strlcpy if_nametoindex if_indextoname getifaddrs \
  314. fcntl)
  315. AC_CHECK_FUNCS(setproctitle, ,
  316. [AC_CHECK_LIB(util, setproctitle,
  317. [LIBS="$LIBS -lutil"
  318. AC_DEFINE(HAVE_SETPROCTITLE,, Have setproctitle)
  319. ]
  320. )
  321. ]
  322. )
  323. dnl ------------------------------------
  324. dnl Determine routing get and set method
  325. dnl ------------------------------------
  326. AC_MSG_CHECKING(zebra between kernel interface method)
  327. if test x"$opsys" = x"gnu-linux"; then
  328. if test "${enable_netlink}" = "yes";then
  329. AC_MSG_RESULT(netlink)
  330. RT_METHOD=rt_netlink.o
  331. AC_DEFINE(HAVE_NETLINK,,netlink)
  332. netlink=yes
  333. elif test "${enable_netlink}" = "no"; then
  334. AC_MSG_RESULT(ioctl)
  335. RT_METHOD=rt_ioctl.o
  336. netlink=no
  337. else
  338. AC_MSG_RESULT(netlink)
  339. RT_METHOD=rt_netlink.o
  340. AC_DEFINE(HAVE_NETLINK,,netlink)
  341. netlink=yes
  342. fi
  343. else
  344. if test "$opsys" = "sol2-6";then
  345. AC_MSG_RESULT(solaris)
  346. KERNEL_METHOD="kernel_socket.o"
  347. RT_METHOD="rt_socket.o"
  348. elif test "$opsys" = "irix" ; then
  349. AC_MSG_RESULT(irix)
  350. KERNEL_METHOD="kernel_socket.o"
  351. RT_METHOD="rt_socket.o"
  352. else
  353. AC_TRY_RUN([#include <errno.h>
  354. #include <sys/types.h>
  355. #include <sys/socket.h>
  356. main ()
  357. {
  358. int ac_sock;
  359. ac_sock = socket (AF_ROUTE, SOCK_RAW, 0);
  360. if (ac_sock < 0 && errno == EINVAL)
  361. exit (1);
  362. exit (0);
  363. }],
  364. [KERNEL_METHOD=kernel_socket.o
  365. RT_METHOD=rt_socket.o
  366. AC_MSG_RESULT(socket)],
  367. [RT_METHOD=rt_ioctl.o
  368. AC_MSG_RESULT(ioctl)],
  369. [KERNEL_METHOD=kernel_socket.o
  370. RT_METHOD=rt_socket.o
  371. AC_MSG_RESULT(socket)])
  372. fi
  373. fi
  374. AC_SUBST(RT_METHOD)
  375. AC_SUBST(KERNEL_METHOD)
  376. AC_SUBST(OTHER_METHOD)
  377. dnl ------------------------------
  378. dnl check kernel route read method
  379. dnl ------------------------------
  380. AC_CACHE_CHECK(route read method check, zebra_rtread,
  381. [if test "$netlink" = yes; then
  382. RTREAD_METHOD="rtread_netlink.o"
  383. zebra_rtread="netlink"
  384. else
  385. for zebra_rtread in /proc/net/route /dev/ip /dev/null;
  386. do
  387. test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break
  388. done
  389. case $zebra_rtread in
  390. "/proc/net/route") RTREAD_METHOD="rtread_proc.o"
  391. zebra_rtread="proc";;
  392. "/dev/ip")
  393. case "$host" in
  394. *-freebsd*) RTREAD_METHOD=rtread_sysctl.o
  395. zebra_rtread="sysctl";;
  396. *) RTREAD_METHOD="rtread_getmsg.o"
  397. zebra_rtread="getmsg";;
  398. esac;;
  399. *) RTREAD_METHOD="rtread_sysctl.o"
  400. zebra_rtread="sysctl";;
  401. esac
  402. fi])
  403. AC_SUBST(RTREAD_METHOD)
  404. dnl -----------------------------
  405. dnl check interface lookup method
  406. dnl -----------------------------
  407. AC_MSG_CHECKING(interface looking up method)
  408. if test "$netlink" = yes; then
  409. AC_MSG_RESULT(netlink)
  410. IF_METHOD=if_netlink.o
  411. else
  412. if test "$opsys" = "sol2-6";then
  413. AC_MSG_RESULT(solaris)
  414. IF_METHOD=if_ioctl.o
  415. elif test "$opsys" = "irix" ; then
  416. AC_MSG_RESULT(irix)
  417. IF_METHOD=if_ioctl.o
  418. elif test "$opsys" = "openbsd";then
  419. AC_MSG_RESULT(openbsd)
  420. IF_METHOD=if_ioctl.o
  421. elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then
  422. AC_MSG_RESULT(sysctl)
  423. IF_METHOD=if_sysctl.o
  424. AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST)
  425. else
  426. AC_MSG_RESULT(ioctl)
  427. IF_METHOD=if_ioctl.o
  428. fi
  429. fi
  430. AC_SUBST(IF_METHOD)
  431. dnl -----------------------
  432. dnl check proc file system.
  433. dnl -----------------------
  434. if test -r /proc/net/dev; then
  435. AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev)
  436. IF_PROC=if_proc.o
  437. fi
  438. if test -r /proc/net/if_inet6; then
  439. AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6)
  440. IF_PROC=if_proc.o
  441. fi
  442. AC_SUBST(IF_PROC)
  443. dnl -----------------------------
  444. dnl check ipforward detect method
  445. dnl -----------------------------
  446. AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path,
  447. [for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null;
  448. do
  449. test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break
  450. done
  451. case $zebra_ipforward_path in
  452. "/proc/net/snmp") IPFORWARD=ipforward_proc.o
  453. zebra_ipforward_path="proc";;
  454. "/dev/ip")
  455. case "$host" in
  456. *-nec-sysv4*) IPFORWARD=ipforward_ews.o
  457. zebra_ipforward_path="ews";;
  458. *-freebsd*) IPFORWARD=ipforward_sysctl.o
  459. zebra_ipforward_path="sysctl";;
  460. *) IPFORWARD=ipforward_solaris.o
  461. zebra_ipforward_path="solaris";;
  462. esac;;
  463. *) IPFORWARD=ipforward_sysctl.o
  464. zebra_ipforward_path="sysctl";;
  465. esac])
  466. AC_SUBST(IPFORWARD)
  467. AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no])
  468. dnl ----------
  469. dnl IPv6 check
  470. dnl ----------
  471. AC_MSG_CHECKING(whether does this OS have IPv6 stack)
  472. if test "${enable_ipv6}" = "no"; then
  473. AC_MSG_RESULT(disabled)
  474. else
  475. dnl ----------
  476. dnl INRIA IPv6
  477. dnl ----------
  478. if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
  479. zebra_cv_ipv6=yes
  480. AC_DEFINE(HAVE_IPV6,1,INRIA IPv6)
  481. AC_DEFINE(INRIA_IPV6,1,INRIA IPv6)
  482. RIPNGD="ripngd"
  483. OSPF6D="ospf6d"
  484. LIB_IPV6=""
  485. AC_MSG_RESULT(INRIA IPv6)
  486. dnl ---------
  487. dnl KAME IPv6
  488. dnl ---------
  489. elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
  490. zebra_cv_ipv6=yes
  491. AC_DEFINE(HAVE_IPV6,1,KAME IPv6)
  492. AC_DEFINE(KAME,1,KAME IPv6)
  493. RIPNGD="ripngd"
  494. OSPF6D="ospf6d"
  495. if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
  496. LIB_IPV6="-L/usr/local/v6/lib -linet6"
  497. fi
  498. AC_MSG_RESULT(KAME)
  499. dnl -------------------------
  500. dnl MUSICA IPv6
  501. dnl default host check
  502. dnl It is not used by Kheops
  503. dnl -------------------------
  504. elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then
  505. zebra_cv_ipv6=yes
  506. AC_DEFINE(HAVE_IPV6,1,Musicia IPv6)
  507. AC_DEFINE(MUSICA,1,Musica IPv6 stack)
  508. AC_DEFINE(KAME,1,KAME IPv6 stack)
  509. RIPNGD="ripngd"
  510. OSPF6D="ospf6d"
  511. if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
  512. LIB_IPV6="-L/usr/local/v6/lib -linet6"
  513. fi
  514. AC_MSG_RESULT(MUSICA)
  515. dnl ---------
  516. dnl NRL check
  517. dnl ---------
  518. elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
  519. zebra_cv_ipv6=yes
  520. AC_DEFINE(HAVE_IPV6,1,NRL IPv6)
  521. AC_DEFINE(NRL,1,NRL)
  522. RIPNGD="ripngd"
  523. OSPF6D="ospf6d"
  524. if test x"$opsys" = x"bsdi";then
  525. AC_DEFINE(BSDI_NRL,,BSDI)
  526. AC_MSG_RESULT(BSDI_NRL)
  527. else
  528. AC_MSG_RESULT(NRL)
  529. fi
  530. dnl ----------
  531. dnl Linux IPv6
  532. dnl ----------
  533. elif test "${enable_ipv6}" = "yes"; then
  534. AC_EGREP_CPP(yes, [
  535. #include <linux/version.h>
  536. /* 2.1.128 or later */
  537. #if LINUX_VERSION_CODE >= 0x020180
  538. yes
  539. #endif],
  540. [zebra_cv_ipv6=yes
  541. zebra_cv_linux_ipv6=yes
  542. AC_MSG_RESULT(Linux IPv6)])
  543. else
  544. if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route"
  545. then
  546. zebra_cv_ipv6=yes
  547. zebra_cv_linux_ipv6=yes
  548. AC_MSG_RESULT(Linux IPv6)
  549. fi
  550. fi
  551. if test "$zebra_cv_linux_ipv6" = "yes";then
  552. AC_MSG_CHECKING(for GNU libc >= 2.1)
  553. AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
  554. AC_EGREP_CPP(yes, [
  555. #include <features.h>
  556. #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
  557. yes
  558. #endif],
  559. [glibc=yes
  560. AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
  561. AC_MSG_RESULT(yes)],
  562. AC_MSG_RESULT(no)
  563. )
  564. RIPNGD="ripngd"
  565. OSPF6D="ospf6d"
  566. if test "$glibc" != "yes"; then
  567. INCLUDES="-I/usr/inet6/include"
  568. if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
  569. LIB_IPV6="-L/usr/inet6/lib -linet6"
  570. fi
  571. fi
  572. fi
  573. dnl -----------------------
  574. dnl Set IPv6 related values
  575. dnl -----------------------
  576. LIBS="$LIB_IPV6 $LIBS"
  577. AC_SUBST(LIB_IPV6)
  578. if test x"$RIPNGD" = x""; then
  579. AC_MSG_RESULT(IPv4 only)
  580. fi
  581. fi
  582. dnl --------------------
  583. dnl Daemon disable check
  584. dnl --------------------
  585. if test "${enable_zebra}" = "no";then
  586. ZEBRA=""
  587. else
  588. ZEBRA="zebra"
  589. fi
  590. if test "${enable_bgpd}" = "no";then
  591. BGPD=""
  592. else
  593. BGPD="bgpd"
  594. fi
  595. if test "${enable_ripd}" = "no";then
  596. RIPD=""
  597. else
  598. RIPD="ripd"
  599. fi
  600. if test "${enable_ospfd}" = "no";then
  601. OSPFD=""
  602. else
  603. OSPFD="ospfd"
  604. fi
  605. OSPFCLIENT=""
  606. if test "${enable_opaque_lsa}" = "yes"; then
  607. if test "${enable_ospfapi}" != "no";then
  608. AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
  609. if test "${enable_ospfclient}" != "no";then
  610. OSPFCLIENT="ospfclient"
  611. fi
  612. fi
  613. fi
  614. case "${enable_ripngd}" in
  615. "yes") RIPNGD="ripngd";;
  616. "no" ) RIPNGD="";;
  617. * ) ;;
  618. esac
  619. case "${enable_ospf6d}" in
  620. "yes") OSPF6D="ospf6d";;
  621. "no" ) OSPF6D="";;
  622. * ) ;;
  623. esac
  624. if test "${enable_bgp_announce}" = "no";then
  625. AC_DEFINE(DISABLE_BGP_ANNOUNCE,,Disable BGP installation to zebra)
  626. fi
  627. AC_SUBST(ZEBRA)
  628. AC_SUBST(BGPD)
  629. AC_SUBST(RIPD)
  630. AC_SUBST(RIPNGD)
  631. AC_SUBST(OSPFD)
  632. AC_SUBST(OSPF6D)
  633. AC_SUBST(VTYSH)
  634. AC_SUBST(INCLUDES)
  635. AC_SUBST(CURSES)
  636. AC_SUBST(OSPFCLIENT)
  637. AC_SUBST(OSPFAPI)
  638. AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)])
  639. AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)])
  640. AC_CHECK_LIB(crypt, crypt)
  641. AC_CHECK_LIB(resolv, res_init)
  642. AC_CHECK_LIB(m, main)
  643. dnl ---------------------------------------------------
  644. dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY
  645. dnl ---------------------------------------------------
  646. AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP,,__inet_ntop))
  647. AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton))
  648. AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton))
  649. dnl ---------------------------
  650. dnl check system has GNU regexp
  651. dnl ---------------------------
  652. dnl AC_MSG_CHECKING(whether system has GNU regex)
  653. AC_CHECK_LIB(c, regexec,
  654. [AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library)
  655. LIB_REGEX=""],
  656. [LIB_REGEX="regex.o"])
  657. AC_SUBST(LIB_REGEX)
  658. dnl ------------------
  659. dnl check SNMP library
  660. dnl ------------------
  661. if test "${enable_snmp}" = "yes";then
  662. dnl AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
  663. if test "${HAVE_SNMP}" = ""; then
  664. old_libs="${LIBS}"
  665. LIBS="-L/usr/lib"
  666. unset ac_cv_lib_snmp_asn_parse_int
  667. AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
  668. if test "${NEED_CRYPTO}" = ""; then
  669. AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes ])
  670. else
  671. AC_CHECK_LIB(netsnmp, asn_parse_int, [HAVE_NETSNMP=yes; HAVE_SNMP=yes; NEED_CRYPTO=yes;LIBS="$LIBS -lcrypto" ],,"-lcrypto")
  672. fi
  673. LIBS="${old_libs}"
  674. fi
  675. if test "${HAVE_SNMP}" = ""; then
  676. old_libs="${LIBS}"
  677. LIBS="-L/usr/lib"
  678. unset ac_cv_lib_snmp_asn_parse_int
  679. AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes, )
  680. if test "${HAVE_SNMP}" = ""; then
  681. unset ac_cv_lib_snmp_asn_parse_int
  682. AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
  683. if test "${NEED_CRYPTO}" = "yes"; then
  684. AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
  685. fi
  686. fi
  687. LIBS="${old_libs}"
  688. fi
  689. if test "${HAVE_SNMP}" = ""; then
  690. old_libs="${LIBS}"
  691. LIBS="-L/usr/local/lib"
  692. unset ac_cv_lib_snmp_asn_parse_int
  693. AC_CHECK_LIB(snmp, asn_parse_int, HAVE_SNMP=yes)
  694. if test "${HAVE_SNMP}" = ""; then
  695. unset ac_cv_lib_snmp_asn_parse_int
  696. AC_CHECK_LIB(crypto, main, NEED_CRYPTO=yes, )
  697. if test "${NEED_CRYPTO}" = "yes"; then
  698. AC_CHECK_LIB(snmp, asn_parse_int, [HAVE_SNMP=yes; NEED_CRYPTO=yes; LIBS="$LIBS -lcrypto" ],,"-lcrypto")
  699. fi
  700. fi
  701. LIBS="${old_libs}"
  702. fi
  703. if test "${HAVE_SNMP}" = "yes"; then
  704. for ac_snmp in /usr/include/net-snmp/library/asn1.h /usr/include/ucd-snmp/asn1.h /usr/local/include/ucd-snmp/asn1.h /dev/null
  705. do
  706. test -f "${ac_snmp}" && break
  707. done
  708. case ${ac_snmp} in
  709. /usr/include/net-snmp/*)
  710. AC_DEFINE(HAVE_SNMP,,SNMP)
  711. AC_DEFINE(HAVE_NETSNMP,,SNMP)
  712. AC_DEFINE(UCD_COMPATIBLE,,SNMP)
  713. CFLAGS="${CFLAGS} -I/usr/include/net-snmp -I/usr/include/net-snmp/library"
  714. if test "${HAVE_NETSNMP}" = "yes"; then
  715. LIBS="${LIBS} -lnetsnmp"
  716. else
  717. LIBS="${LIBS} -lsnmp"
  718. fi
  719. ;;
  720. /usr/include/ucd-snmp/*)
  721. AC_DEFINE(HAVE_SNMP,,SNMP)
  722. CFLAGS="${CFLAGS} -I/usr/include/ucd-snmp"
  723. LIBS="${LIBS} -lsnmp"
  724. ;;
  725. /usr/local/include/ucd-snmp/*)
  726. AC_DEFINE(HAVE_SNMP,,SNMP)
  727. CFLAGS="${CFLAGS} -I/usr/local/include/ucd-snmp"
  728. LIBS="${LIBS} -L/usr/local/lib -lsnmp"
  729. ;;
  730. esac
  731. if test "${NEED_CRYPTO}" = "yes"; then
  732. LIBS="${LIBS} -lcrypto"
  733. fi
  734. fi
  735. fi
  736. dnl ----------------------------
  737. dnl check sa_len of sockaddr
  738. dnl ----------------------------
  739. AC_MSG_CHECKING(whether struct sockaddr has a sa_len field)
  740. AC_TRY_COMPILE([#include <sys/types.h>
  741. #include <sys/socket.h>
  742. ],[static struct sockaddr ac_i;int ac_j = sizeof (ac_i.sa_len);],
  743. [AC_MSG_RESULT(yes)
  744. AC_DEFINE(HAVE_SA_LEN,,sa_len)],
  745. AC_MSG_RESULT(no))
  746. dnl ----------------------------
  747. dnl check sin_len of sockaddr_in
  748. dnl ----------------------------
  749. AC_MSG_CHECKING(whether struct sockaddr_in has a sin_len field)
  750. AC_TRY_COMPILE([#include <sys/types.h>
  751. #include <netinet/in.h>
  752. ],[static struct sockaddr_in ac_i;int ac_j = sizeof (ac_i.sin_len);],
  753. [AC_MSG_RESULT(yes)
  754. AC_DEFINE(HAVE_SIN_LEN,,sin_len)],
  755. AC_MSG_RESULT(no))
  756. dnl ----------------------------
  757. dnl check sun_len of sockaddr_un
  758. dnl ----------------------------
  759. AC_MSG_CHECKING(whether struct sockaddr_un has a sun_len field)
  760. AC_TRY_COMPILE([#include <sys/types.h>
  761. #include <sys/un.h>
  762. ],[static struct sockaddr_un ac_i;int ac_j = sizeof (ac_i.sun_len);],
  763. [AC_MSG_RESULT(yes)
  764. AC_DEFINE(HAVE_SUN_LEN,,sun_len)],
  765. AC_MSG_RESULT(no))
  766. dnl -----------------------------------
  767. dnl check sin6_scope_id of sockaddr_in6
  768. dnl -----------------------------------
  769. if test "$zebra_cv_ipv6" = yes; then
  770. AC_MSG_CHECKING(whether struct sockaddr_in6 has a sin6_scope_id field)
  771. AC_TRY_COMPILE([#include <sys/types.h>
  772. #include <netinet/in.h>
  773. ],[static struct sockaddr_in6 ac_i;int ac_j = sizeof (ac_i.sin6_scope_id);],
  774. [AC_MSG_RESULT(yes)
  775. AC_DEFINE(HAVE_SIN6_SCOPE_ID,,scope id)],
  776. AC_MSG_RESULT(no))
  777. fi
  778. dnl ----------------------------
  779. dnl check socklen_t exist or not
  780. dnl ----------------------------
  781. AC_MSG_CHECKING(whther socklen_t is defined)
  782. AC_TRY_COMPILE([#include <sys/types.h>
  783. #include <sys/socket.h>
  784. #include <netinet/in.h>
  785. ],[socklen_t ac_x;],
  786. [AC_MSG_RESULT(yes)
  787. AC_DEFINE(HAVE_SOCKLEN_T,,socklen_t)],
  788. AC_MSG_RESULT(no))
  789. dnl ------------------------
  790. dnl check struct sockaddr_dl
  791. dnl ------------------------
  792. AC_MSG_CHECKING(whether struct sockaddr_dl exist)
  793. AC_EGREP_HEADER(sockaddr_dl,
  794. net/if_dl.h,
  795. [AC_MSG_RESULT(yes)
  796. AC_DEFINE(HAVE_SOCKADDR_DL,,sockaddr_dl)],
  797. AC_MSG_RESULT(no))
  798. dnl --------------------------
  799. dnl check structure ifaliasreq
  800. dnl --------------------------
  801. AC_MSG_CHECKING(whether struct ifaliasreq exist)
  802. AC_EGREP_HEADER(ifaliasreq,
  803. net/if.h,
  804. [AC_MSG_RESULT(yes)
  805. AC_DEFINE(HAVE_IFALIASREQ,,ifaliasreq)],
  806. AC_MSG_RESULT(no))
  807. dnl ----------------------------
  808. dnl check structure in6_aliasreq
  809. dnl ----------------------------
  810. AC_MSG_CHECKING(whether struct in6_aliasreq exist)
  811. AC_EGREP_HEADER(in6_aliasreq,
  812. netinet6/in6_var.h,
  813. [AC_MSG_RESULT(yes)
  814. AC_DEFINE(HAVE_IN6_ALIASREQ,,in6_aliasreq)],
  815. AC_MSG_RESULT(no))
  816. dnl -----------------------------------
  817. dnl check ifra_lifetime of in6_aliasreq
  818. dnl -----------------------------------
  819. AC_MSG_CHECKING(whether in6_aliasreq.ifra_lifetime exist)
  820. AC_TRY_COMPILE([#include <sys/types.h>
  821. #include <netinet6/in6_var.h>
  822. ],[static struct if6_aliasreq ac_i;int ac_j = sizeof (ac_i.ifra_lifetime);],
  823. [AC_MSG_RESULT(yes)
  824. AC_DEFINE(HAVE_IFRA_LIFETIME,,Have in6_aliasreq.ifra_lifetime)],
  825. AC_MSG_RESULT(no))
  826. dnl ---------------------------
  827. dnl check structure rt_addrinfo
  828. dnl ---------------------------
  829. AC_MSG_CHECKING(whether struct rt_addrinfo exist)
  830. AC_EGREP_HEADER(rt_addrinfo,
  831. net/route.h,
  832. [AC_MSG_RESULT(yes)
  833. AC_DEFINE(HAVE_RT_ADDRINFO,,rt_addrinfo)],
  834. AC_MSG_RESULT(no))
  835. dnl --------------------------
  836. dnl check structure in_pktinfo
  837. dnl --------------------------
  838. AC_MSG_CHECKING(whether struct in_pktinfo exist)
  839. AC_TRY_COMPILE([#include <netinet/in.h>
  840. ],[struct in_pktinfo ac_x;],
  841. [AC_MSG_RESULT(yes)
  842. AC_DEFINE(HAVE_INPKTINFO,,in_pktinfo)],
  843. AC_MSG_RESULT(no))
  844. dnl --------------------------------------
  845. dnl checking for getrusage struct and call
  846. dnl --------------------------------------
  847. AC_MSG_CHECKING(whether getrusage is available)
  848. AC_TRY_COMPILE([#include <sys/resource.h>
  849. ],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);],
  850. [AC_MSG_RESULT(yes)
  851. AC_DEFINE(HAVE_RUSAGE,,rusage)],
  852. AC_MSG_RESULT(no))
  853. dnl -------------------
  854. dnl capabilities checks
  855. dnl -------------------
  856. AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available)
  857. AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);],
  858. [AC_MSG_RESULT(yes)
  859. AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl)
  860. quagga_ac_keepcaps="yes"],
  861. AC_MSG_RESULT(no)
  862. )
  863. if test x"${quagga_ac_keepcaps}" = x"yes"; then
  864. AC_CHECK_HEADERS(sys/capability.h)
  865. fi
  866. if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then
  867. AC_CHECK_LIB(cap, cap_init,
  868. [AC_DEFINE(HAVE_LCAPS,1,Capabilities)
  869. LIBCAP="-lcap"
  870. ]
  871. )
  872. fi
  873. AC_SUBST(LIBCAP)
  874. dnl ---------------------------
  875. dnl check for glibc 'backtrace'
  876. dnl ---------------------------
  877. if test "${glibc}" = "yes"; then
  878. AC_CHECK_HEADER(execinfo.h)
  879. fi
  880. if test x"${ac_cv_header_execinfo_h}" = x"yes"; then
  881. AC_CHECK_FUNC(backtrace,
  882. [AC_DEFINE(HAVE_GLIBC_BACKTRACE,,Glibc backtrace)]
  883. )
  884. fi
  885. dnl ----------
  886. dnl configure date
  887. dnl ----------
  888. CONFDATE=`date '+%Y%m%d'`
  889. AC_SUBST(CONFDATE)
  890. dnl ------------------------------
  891. dnl set paths for state directory
  892. dnl ------------------------------
  893. if test "${prefix}" = "NONE"; then
  894. quagga_statedir_prefix="";
  895. else
  896. quagga_statedir_prefix=${prefix}
  897. fi
  898. if test "${localstatedir}" = '${prefix}/var'; then
  899. AC_CACHE_CHECK(state directory,ac_statedir,
  900. [for QUAGGA_STATE_DIR in ${quagga_statedir_prefix}/var/run dnl
  901. ${quagga_statedir_prefix}/var/adm dnl
  902. ${quagga_statedir_prefix}/etc dnl
  903. /var/run dnl
  904. /var/adm dnl
  905. /etc dnl
  906. /dev/null;
  907. do
  908. test -d $QUAGGA_STATE_DIR && break
  909. done
  910. quagga_statedir=$QUAGGA_STATE_DIR])
  911. else
  912. quagga_statedir=${localstatedir}
  913. AC_MSG_CHECKING(directory to use for state file)
  914. AC_MSG_RESULT(${quagga_statedir})
  915. fi
  916. if test $quagga_statedir = "/dev/null"; then
  917. AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!')
  918. fi
  919. AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$quagga_statedir/zebra.pid",zebra PID)
  920. AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$quagga_statedir/ripd.pid",ripd PID)
  921. AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$quagga_statedir/ripngd.pid",ripngd PID)
  922. AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$quagga_statedir/bgpd.pid",bgpd PID)
  923. AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$quagga_statedir/ospfd.pid",ospfd PID)
  924. AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$quagga_statedir/ospf6d.pid",ospf6d PID)
  925. AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$quagga_statedir/zserv.api",zebra api socket)
  926. AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$quagga_statedir/zebra.vty",zebra vty socket)
  927. AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$quagga_statedir/ripd.vty",rip vty socket)
  928. AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$quagga_statedir/ripngd.vty",ripng vty socket)
  929. AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$quagga_statedir/bgpd.vty",bgpd vty socket)
  930. AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$quagga_statedir/ospfd.vty",ospfd vty socket)
  931. AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$quagga_statedir/ospf6d.vty",ospf6d vty socket)
  932. dnl ---------------------------
  933. dnl Check htonl works correctly
  934. dnl ---------------------------
  935. AC_MSG_CHECKING(for working htonl)
  936. AC_CACHE_VAL(ac_cv_htonl_works, [
  937. AC_TRY_LINK([#ifdef HAVE_SYS_TYPES_H
  938. #include <sys/types.h>
  939. #endif
  940. #ifdef HAVE_NETDB_H
  941. #include <netdb.h>
  942. #endif
  943. #ifdef HAVE_NETINET_IN_H
  944. #include <netinet/in.h>
  945. #endif],
  946. [htonl (0);],
  947. ac_cv_htonl_works=yes,
  948. ac_cv_htonl_works=no)])
  949. AC_MSG_RESULT($ac_cv_htonl_works)
  950. AC_OUTPUT(Makefile lib/Makefile zebra/Makefile ripd/Makefile
  951. ripngd/Makefile bgpd/Makefile ospfd/Makefile
  952. ospf6d/Makefile vtysh/Makefile doc/Makefile
  953. ospfclient/Makefile
  954. redhat/quagga.spec
  955. lib/version.h)
  956. echo "
  957. zebra configuration
  958. -------------------
  959. quagga version : ${PACKAGE_VERSION}
  960. host operationg system : ${host_os}
  961. source code location : ${srcdir}
  962. compiler : ${CC}
  963. compiler flags : ${CFLAGS}
  964. linker flags : ${LDFLAGS} ${LIBS}
  965. state file directory : ${quagga_statedir}
  966. config file directory : `eval echo \`echo ${sysconfdir}\``
  967. user to run as : ${enable_user}
  968. group to run as : ${enable_group}
  969. group for vty sockets : ${enable_vty_group}
  970. The above user and group must have read/write access to the state file
  971. directory and to the config files in the config file directory.
  972. "