configure.ac 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538
  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. ## $Id$
  9. AC_PREREQ(2.53)
  10. AC_INIT(Quagga, 0.99.10, [http://bugzilla.quagga.net])
  11. AC_CONFIG_SRCDIR(lib/zebra.h)
  12. dnl -----------------------------------
  13. dnl Get hostname and other information.
  14. dnl -----------------------------------
  15. AC_CANONICAL_BUILD()
  16. AC_CANONICAL_HOST()
  17. AC_CANONICAL_TARGET()
  18. AM_INIT_AUTOMAKE(1.6)
  19. AM_CONFIG_HEADER(config.h)
  20. dnl GNU awk is required for lib/memtype.h made by memtypes.awk.
  21. dnl BSD awk complains: awk: gensub doesn't support backreferences (subst "\1")
  22. AC_CHECK_PROG([GAWK],[gawk],[gawk],[/bin/false])
  23. AC_ARG_VAR([GAWK],[GNU AWK])
  24. dnl default is to match previous behavior
  25. exampledir=${sysconfdir}
  26. AC_ARG_ENABLE([exampledir],
  27. AC_HELP_STRING([--enable-exampledir],
  28. [specify alternate directory for examples]),
  29. exampledir="$enableval",)
  30. dnl XXX add --exampledir to autoconf standard directory list somehow
  31. AC_SUBST(exampledir)
  32. dnl default is to match previous behavior
  33. pkgsrcrcdir=""
  34. pkgsrcdir=""
  35. AC_ARG_ENABLE([pkgsrcrcdir],
  36. AC_HELP_STRING([--enable-pkgsrcrcdir],
  37. [specify directory for rc.d scripts]),
  38. pkgsrcrcdir="$enableval"; pkgsrcdir="pkgsrc",)
  39. dnl XXX add --pkgsrcrcdir to autoconf standard directory list somehow
  40. AC_SUBST(pkgsrcdir)
  41. AC_SUBST(pkgsrcrcdir)
  42. dnl ------------
  43. dnl Check CFLAGS
  44. dnl ------------
  45. AC_ARG_WITH(cflags,
  46. [ --with-cflags Set CFLAGS for use in compilation.])
  47. if test "x$with_cflags" != "x" ; then
  48. CFLAGS="$with_cflags" ; cflags_specified=yes ;
  49. elif test -n "$CFLAGS" ; then
  50. cflags_specified=yes ;
  51. fi
  52. dnl --------------------
  53. dnl Check CC and friends
  54. dnl --------------------
  55. AC_LANG([C])
  56. AC_PROG_CC
  57. AC_PROG_CPP
  58. AM_PROG_CC_C_O
  59. AC_PROG_EGREP
  60. dnl autoconf 2.59 appears not to support AC_PROG_SED
  61. dnl AC_PROG_SED
  62. AC_CHECK_PROG([SED],[sed],[sed],[/bin/false])
  63. dnl ------------------------------------------------------------------
  64. dnl Intel compiler check. Although Intel tries really hard to make icc
  65. dnl look like gcc, there are some differences. It's very verbose with
  66. dnl -Wall and it doesn't support the individual -W options.
  67. dnl ------------------------------------------------------------------
  68. if test "x${GCC}" = "xyes" ; then
  69. COMPILER="GCC"
  70. AC_MSG_CHECKING([whether we are using the Intel compiler])
  71. AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
  72. [AC_MSG_RESULT([no])],
  73. [COMPILER="ICC"
  74. AC_MSG_RESULT([yes])]
  75. )
  76. else
  77. AC_MSG_CHECKING([whether we are using SunPro compiler])
  78. AC_EGREP_CPP([^__SUNPRO_C.*0x5(7|8|9)], ["__SUNPRO_C" __SUNPRO_C],
  79. [AC_MSG_RESULT([no])],
  80. [COMPILER="SUNPRO"
  81. AC_MSG_RESULT([yes])]
  82. )
  83. fi
  84. dnl ---------------------------------------------
  85. dnl If CLFAGS doesn\'t exist set default value
  86. dnl AC_PROG_CC will have set minimal default
  87. dnl already, eg "-O2 -g" for gcc, "-g" for others
  88. dnl (Wall is gcc specific... have to make sure
  89. dnl gcc is being used before setting it)
  90. dnl
  91. dnl Intel icc 8.0 also sets __GNUC__,
  92. dnl but doesn't support all these fancy -W options.
  93. dnl Intel compiler warnings we ignore:
  94. dnl 279: controlling expression is constant.
  95. dnl 869: parameter "xxx" was never referenced - to avoid massive warnings
  96. dnl about "self", "vty", "argc" and "argv" never referenced in DEFUN
  97. dnl macro.
  98. dnl 981: operands are evaluated in unspecified order.
  99. dnl
  100. dnl Sun Studio 10 / SunPro 5.7 is also supported,
  101. dnl so lets set some sane CFLAGS for it.
  102. dnl ---------------------------------------------
  103. AC_MSG_CHECKING([whether to set a default CFLAGS])
  104. if test "x${cflags_specified}" = "x" ; then
  105. case ${COMPILER} in
  106. "ICC")
  107. CFLAGS="-Os -g -Wall -wd 279,869,981"
  108. AC_MSG_RESULT([Intel default])
  109. ;;
  110. "GCC")
  111. CFLAGS="-Os -fno-omit-frame-pointer -g -std=gnu99 -Wall"
  112. CFLAGS="${CFLAGS} -Wsign-compare -Wpointer-arith"
  113. CFLAGS="${CFLAGS} -Wbad-function-cast -Wwrite-strings"
  114. CFLAGS="${CFLAGS} -Wmissing-prototypes -Wmissing-declarations"
  115. CFLAGS="${CFLAGS} -Wchar-subscripts -Wcast-qual"
  116. # TODO: conditionally addd -Wpacked if handled
  117. AC_MSG_RESULT([gcc default])
  118. ;;
  119. "SUNPRO")
  120. CFLAGS="-xO4 -v -g -xspace -xcode=pic32 -xstrconst -xc99"
  121. AC_MSG_RESULT([SunPro default])
  122. ;;
  123. *)
  124. AC_MSG_RESULT([unknown compiler])
  125. ;;
  126. esac
  127. else
  128. AC_MSG_RESULT([CFLAGS supplied by user])
  129. fi
  130. dnl --------------
  131. dnl Check programs
  132. dnl --------------
  133. AC_PROG_INSTALL
  134. AC_PROG_LN_S
  135. AC_PROG_MAKE_SET
  136. AC_CHECK_TOOL(AR, ar)
  137. dnl ---------------------------
  138. dnl We, perhaps unfortunately,
  139. dnl depend on GNU Make specific
  140. dnl constructs.
  141. dnl Give the user a warning if
  142. dnl not GNU Make.
  143. dnl ---------------------------
  144. AC_CACHE_CHECK([if ${MAKE-make} is GNU make], [quagga_cv_gnu_make],
  145. [quagga_cv_gnu_make=no
  146. if ${MAKE-make} --version 2>/dev/null | \
  147. grep '^GNU Make ' >/dev/null ; then
  148. quagga_cv_gnu_make=yes;
  149. fi
  150. ]
  151. )
  152. dnl -----------------
  153. dnl System extensions
  154. dnl -----------------
  155. AC_AIX
  156. AC_GNU_SOURCE
  157. dnl -------
  158. dnl libtool
  159. dnl -------
  160. AC_PROG_LIBTOOL
  161. dnl ----------------------
  162. dnl Packages configuration
  163. dnl ----------------------
  164. AC_ARG_ENABLE(vtysh,
  165. [ --enable-vtysh include integrated vty shell for Quagga])
  166. AC_ARG_ENABLE(ipv6,
  167. [ --disable-ipv6 turn off IPv6 related features and daemons])
  168. AC_ARG_ENABLE(zebra,
  169. [ --disable-zebra do not build zebra daemon])
  170. AC_ARG_ENABLE(bgpd,
  171. [ --disable-bgpd do not build bgpd])
  172. AC_ARG_ENABLE(ripd,
  173. [ --disable-ripd do not build ripd])
  174. AC_ARG_ENABLE(ripngd,
  175. [ --disable-ripngd do not build ripngd])
  176. AC_ARG_ENABLE(ospfd,
  177. [ --disable-ospfd do not build ospfd])
  178. AC_ARG_ENABLE(ospf6d,
  179. [ --disable-ospf6d do not build ospf6d])
  180. AC_ARG_ENABLE(watchquagga,
  181. [ --disable-watchquagga do not build watchquagga])
  182. AC_ARG_ENABLE(isisd,
  183. [ --enable-isisd build isisd])
  184. AC_ARG_ENABLE(solaris,
  185. [ --enable-solaris build solaris])
  186. AC_ARG_ENABLE(bgp-announce,
  187. [ --disable-bgp-announce, turn off BGP route announcement])
  188. AC_ARG_ENABLE(netlink,
  189. [ --enable-netlink force to use Linux netlink interface])
  190. AC_ARG_ENABLE(broken-aliases,
  191. [ --enable-broken-aliases enable aliases as distinct interfaces for Linux 2.2.X])
  192. AC_ARG_ENABLE(snmp,
  193. [ --enable-snmp enable SNMP support])
  194. AC_ARG_WITH(libpam,
  195. [ --with-libpam use libpam for PAM support in vtysh])
  196. AC_ARG_ENABLE(tcp-zebra,
  197. [ --enable-tcp-zebra enable TCP/IP socket connection between zebra and protocol daemon])
  198. AC_ARG_ENABLE(opaque-lsa,
  199. [ --enable-opaque-lsa enable OSPF Opaque-LSA with OSPFAPI support (RFC2370)])
  200. AC_ARG_ENABLE(ospfapi,
  201. [ --disable-ospfapi do not build OSPFAPI to access the OSPF LSA Database,
  202. (this is the default if --enable-opaque-lsa is not set)])
  203. AC_ARG_ENABLE(ospfclient,
  204. [ --disable-ospfclient do not build OSPFAPI client for OSPFAPI,
  205. (this is the default if --disable-ospfapi is set)])
  206. AC_ARG_ENABLE(ospf-te,
  207. [ --enable-ospf-te enable Traffic Engineering Extension to OSPF])
  208. AC_ARG_ENABLE(multipath,
  209. [ --enable-multipath=ARG enable multipath function, ARG must be digit])
  210. AC_ARG_ENABLE(quagga_user,
  211. [ --enable-user=ARG user to run Quagga suite as (default quagga)])
  212. AC_ARG_ENABLE(quagga_group,
  213. [ --enable-group=ARG group to run Quagga suite as (default quagga)])
  214. AC_ARG_ENABLE(vty_group,
  215. [ --enable-vty-group=ARG set vty sockets to have specified group as owner])
  216. AC_ARG_ENABLE(configfile_mask,
  217. [ --enable-configfile-mask=ARG set mask for config files])
  218. AC_ARG_ENABLE(logfile_mask,
  219. [ --enable-logfile-mask=ARG set mask for log files])
  220. AC_ARG_ENABLE(rtadv,
  221. [ --disable-rtadv disable IPV6 router advertisement feature])
  222. AC_ARG_ENABLE(irdp,
  223. [ --enable-irdp enable IRDP server support in zebra])
  224. AC_ARG_ENABLE(isis_topology,
  225. [ --enable-isis-topology enable IS-IS topology generator])
  226. AC_ARG_ENABLE(capabilities,
  227. [ --disable-capabilities disable using POSIX capabilities])
  228. AC_ARG_ENABLE(gcc_ultra_verbose,
  229. [ --enable-gcc-ultra-verbose enable ultra verbose GCC warnings])
  230. AC_ARG_ENABLE(gcc-rdynamic,
  231. [ --enable-gcc-rdynamic enable gcc linking with -rdynamic for better backtraces])
  232. AC_ARG_ENABLE(time-check,
  233. [ --disable-time-check disable slow thread warning messages])
  234. if test x"${enable_gcc_ultra_verbose}" = x"yes" ; then
  235. CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes"
  236. CFLAGS="${CFLAGS} -Wmissing-declarations -Wmissing-noreturn"
  237. CFLAGS="${CFLAGS} -Wmissing-format-attribute -Wunreachable-code"
  238. CFLAGS="${CFLAGS} -Wpacked -Wpadded"
  239. fi
  240. if test x"${enable_gcc_rdynamic}" = x"yes" ; then
  241. LDFLAGS="${LDFLAGS} -rdynamic"
  242. fi
  243. if test x"${enable_time_check}" != x"no" ; then
  244. if test x"${enable_time_check}" = x"yes" -o x"${enable_time_check}" = x ; then
  245. AC_DEFINE(CONSUMED_TIME_CHECK,5000000,Consumed Time Check)
  246. else
  247. AC_DEFINE_UNQUOTED(CONSUMED_TIME_CHECK,$enable_time_check,Consumed Time Check)
  248. fi
  249. fi
  250. if test "${enable_broken_aliases}" = "yes"; then
  251. if test "${enable_netlink}" = "yes"
  252. then
  253. AC_MSG_FAILURE([Sorry you can not use netlink with broken aliases])
  254. fi
  255. AC_DEFINE(HAVE_BROKEN_ALIASES,,Broken Alias)
  256. enable_netlink=no
  257. fi
  258. if test "${enable_tcp_zebra}" = "yes"; then
  259. AC_DEFINE(HAVE_TCP_ZEBRA,,Use TCP for zebra communication)
  260. fi
  261. if test "${enable_opaque_lsa}" = "yes"; then
  262. AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
  263. fi
  264. if test "${enable_ospf_te}" = "yes"; then
  265. AC_DEFINE(HAVE_OPAQUE_LSA,,OSPF Opaque LSA)
  266. AC_DEFINE(HAVE_OSPF_TE,,OSPF TE)
  267. fi
  268. AC_MSG_CHECKING(if zebra should be configurable to send Route Advertisements)
  269. if test "${enable_rtadv}" != "no"; then
  270. AC_MSG_RESULT(yes)
  271. AC_DEFINE(HAVE_RTADV,,Enable IPv6 Routing Advertisement support)
  272. else
  273. AC_MSG_RESULT(no)
  274. fi
  275. if test "${enable_irdp}" = "yes"; then
  276. AC_DEFINE(HAVE_IRDP,, IRDP )
  277. fi
  278. if test "${enable_isisd}" = "yes" && test "${enable_isis_topology}" = yes; then
  279. AC_DEFINE(TOPOLOGY_GENERATE,,Enable IS-IS topology generator code)
  280. ISIS_TOPOLOGY_INCLUDES="-I./topology"
  281. ISIS_TOPOLOGY_DIR="topology"
  282. ISIS_TOPOLOGY_LIB="./topology/libtopology.a"
  283. fi
  284. AC_SUBST(ISIS_TOPOLOGY_INCLUDES)
  285. AC_SUBST(ISIS_TOPOLOGY_DIR)
  286. AC_SUBST(ISIS_TOPOLOGY_LIB)
  287. if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then
  288. enable_user="quagga"
  289. elif test "${enable_user}" = "no"; then
  290. enable_user="root"
  291. fi
  292. if test "${enable_group}" = "yes" || test x"${enable_group}" = x""; then
  293. enable_group="quagga"
  294. elif test "${enable_group}" = "no"; then
  295. enable_group="root"
  296. fi
  297. if test x"${enable_vty_group}" = x"yes" ; then
  298. AC_MSG_ERROR([--enable-vty-group requires a group as argument, not yes])
  299. elif test x"${enable_vty_group}" != x""; then
  300. if test x"${enable_vty_group}" != x"no"; then
  301. AC_DEFINE_UNQUOTED(VTY_GROUP, "${enable_vty_group}", VTY Sockets Group)
  302. fi
  303. fi
  304. AC_SUBST([enable_user])
  305. AC_SUBST([enable_group])
  306. AC_SUBST([enable_vty_group])
  307. AC_DEFINE_UNQUOTED(QUAGGA_USER, "${enable_user}", Quagga User)
  308. AC_DEFINE_UNQUOTED(QUAGGA_GROUP, "${enable_group}", Quagga Group)
  309. enable_configfile_mask=${enable_configfile_mask:-0600}
  310. AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config files)
  311. enable_logfile_mask=${enable_logfile_mask:-0600}
  312. AC_DEFINE_UNQUOTED(LOGFILE_MASK, ${enable_logfile_mask}, Mask for log files)
  313. MULTIPATH_NUM=1
  314. case "${enable_multipath}" in
  315. [[0-9]|[1-9][0-9]])
  316. MULTIPATH_NUM="${enable_multipath}"
  317. ;;
  318. "")
  319. ;;
  320. *)
  321. AC_MSG_FAILURE([Please specify digit to enable multipath ARG])
  322. ;;
  323. esac
  324. AC_SUBST(MULTIPATH_NUM)
  325. dnl ------------------------------------
  326. dnl Check C keywords and standard types
  327. dnl ------------------------------------
  328. AC_C_CONST
  329. AC_C_INLINE
  330. AC_C_RESTRICT
  331. AC_C_VOLATILE
  332. AC_HEADER_STDC
  333. AC_HEADER_TIME
  334. AC_HEADER_SYS_WAIT
  335. dnl AC_TYPE_PID_T
  336. AC_TYPE_UID_T
  337. AC_TYPE_MODE_T
  338. AC_TYPE_SIZE_T
  339. AC_TYPE_SIGNAL
  340. AC_STRUCT_TM
  341. dnl -------------------------
  342. dnl Check other header files.
  343. dnl -------------------------
  344. AC_CHECK_HEADERS([stropts.h sys/ksym.h sys/times.h sys/select.h \
  345. sys/types.h linux/version.h netdb.h asm/types.h \
  346. sys/param.h limits.h signal.h libutil.h \
  347. sys/socket.h netinet/in.h])
  348. dnl Utility macro to avoid retyping includes all the time
  349. m4_define([QUAGGA_INCLUDES],
  350. [#ifdef SUNOS_5
  351. #define _XPG4_2
  352. #define __EXTENSIONS__
  353. #endif
  354. #include <stdio.h>
  355. #if STDC_HEADERS
  356. # include <stdlib.h>
  357. # include <stddef.h>
  358. #else
  359. # if HAVE_STDLIB_H
  360. # include <stdlib.h>
  361. # endif
  362. #endif
  363. #if HAVE_SYS_TYPES_H
  364. # include <sys/types.h>
  365. #endif
  366. /* sys/conf.h depends on param.h on FBSD at least */
  367. #if HAVE_SYS_PARAM_H
  368. # include <sys/param.h>
  369. #endif
  370. /* Required for MAXSIG */
  371. #if HAVE_SIGNAL_H
  372. # include <signal.h>
  373. #endif
  374. #if HAVE_SYS_SOCKET_H
  375. # include <sys/socket.h>
  376. #endif
  377. #if HAVE_NETINET_IN_H
  378. # include <netinet/in.h>
  379. #endif
  380. ])dnl
  381. AC_CHECK_HEADERS([sys/un.h net/if.h netinet/in_systm.h netinet/in_var.h \
  382. net/if_dl.h net/if_var.h net/netopt.h net/route.h \
  383. inet/nd.h arpa/inet.h netinet/ip_icmp.h \
  384. fcntl.h stddef.h sys/ioctl.h syslog.h wchar.h wctype.h \
  385. sys/sysctl.h sys/sockio.h kvm.h sys/conf.h],
  386. [], [], QUAGGA_INCLUDES)
  387. AC_CHECK_HEADERS([ucontext.h], [], [],
  388. [#ifndef __USE_GNU
  389. #define __USE_GNU
  390. #endif /* __USE_GNU */
  391. QUAGGA_INCLUDES
  392. ])
  393. m4_define([QUAGGA_INCLUDES],
  394. QUAGGA_INCLUDES
  395. [#if HAVE_NET_IF_H
  396. # include <net/if.h>
  397. #endif
  398. #if HAVE_SYS_UN_H
  399. # include <sys/un.h>
  400. #endif
  401. #if HAVE_NETINET_IN_SYSTM_H
  402. # include <netinet/in_systm.h>
  403. #endif
  404. #if HAVE_NETINET_IN_VAR_H
  405. # include <netinet/in_var.h>
  406. #endif
  407. #if HAVE_NET_IF_DL_H
  408. # include <net/if_dl.h>
  409. #endif
  410. #if HAVE_NET_IF_VAR_H
  411. # include <net/if_var.h>
  412. #endif
  413. #if HAVE_NET_NETOPT_H
  414. # include <net/netopt.h>
  415. #endif
  416. #if HAVE_NET_ROUTE_H
  417. # include <net/route.h>
  418. #endif
  419. #if HAVE_INET_ND_H
  420. # include <inet/nd.h>
  421. #endif
  422. #if HAVE_ARPA_INET_H
  423. # include <arpa/inet.h>
  424. #endif
  425. /* Required for IDRP */
  426. #if HAVE_NETINET_IP_ICMP_H
  427. # include <netinet/ip_icmp.h>
  428. #endif
  429. ])dnl
  430. dnl V6 headers are checked below, after we check for v6
  431. dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
  432. case "$host" in
  433. [*-sunos5.[6-7]*] | [*-solaris2.[6-7]*])
  434. opsys=sol2-6
  435. AC_DEFINE(SUNOS_56, 1, SunOS 5.6 to 5.7)
  436. AC_DEFINE(SUNOS_5, 1, SunOS 5)
  437. AC_CHECK_LIB(xnet, main)
  438. CURSES=-lcurses
  439. ;;
  440. [*-sunos5.[8-9]] \
  441. | [*-sunos5.1[0-9]] \
  442. | [*-sunos5.1[0-9].[0-9]] \
  443. | [*-solaris2.[8-9]] \
  444. | [*-solaris2.1[0-9]] \
  445. | [*-solaris2.1[0-9].[0-9]])
  446. opsys=sol8
  447. AC_DEFINE(SUNOS_59, 1, [SunOS 5.8 up])
  448. AC_DEFINE(SUNOS_5, 1, [SunOS 5])
  449. AC_CHECK_LIB(socket, main)
  450. AC_CHECK_LIB(nsl, main)
  451. AC_CHECK_LIB(umem, main)
  452. AC_CHECK_FUNCS([printstack],
  453. [AC_DEFINE([HAVE_PRINTSTACK],1,[Solaris printstack])
  454. AC_DEFINE([HAVE_STACK_TRACE],1,[Stack symbols decode functionality])
  455. ])
  456. CURSES=-lcurses
  457. ;;
  458. *-sunos5* | *-solaris2*)
  459. AC_DEFINE(SUNOS_5,,SunOS 5, Unknown SunOS)
  460. AC_CHECK_LIB(socket, main)
  461. AC_CHECK_LIB(nsl, main)
  462. CURSES=-lcurses
  463. ;;
  464. *-linux*)
  465. opsys=gnu-linux
  466. AC_DEFINE(GNU_LINUX,,GNU Linux)
  467. ;;
  468. *-nec-sysv4*)
  469. AC_CHECK_LIB(nsl, gethostbyname)
  470. AC_CHECK_LIB(socket, socket)
  471. ;;
  472. *-openbsd*)
  473. opsys=openbsd
  474. AC_DEFINE(OPEN_BSD,,OpenBSD)
  475. ;;
  476. *-bsdi*)
  477. opsys=bsdi
  478. OTHER_METHOD="mtu_kvm.o"
  479. AC_CHECK_LIB(kvm, main)
  480. ;;
  481. *-irix6.5)
  482. opsys=irix
  483. AC_DEFINE(IRIX_65,,IRIX 6.5)
  484. ;;
  485. esac
  486. dnl ---------------------
  487. dnl Integrated VTY option
  488. dnl ---------------------
  489. case "${enable_vtysh}" in
  490. "yes") VTYSH="vtysh";
  491. AC_DEFINE(VTYSH,,VTY shell)
  492. AC_PATH_PROG(PERL, perl)
  493. dnl Vtysh uses libreadline, which looks for termcap functions at
  494. dnl configure time. We follow readlines search order.
  495. dnl The required procedures are in libtermcap on NetBSD, in
  496. dnl [TODO] on Linux, and in [TODO] on Solaris.
  497. AC_CHECK_LIB(termcap, tputs, LIBREADLINE="$LIBREADLINE -ltermcap",
  498. [AC_CHECK_LIB(tinfo, tputs, LIBREADLINE="$LIBREADLINE -ltinfo",
  499. [AC_CHECK_LIB(curses, tputs, LIBREADLINE="$LIBREADLINE -lcurses",
  500. [AC_CHECK_LIB(ncurses, tputs,
  501. LIBREADLINE="$LIBREADLINE -lncurses")]
  502. )]
  503. )]
  504. )
  505. AC_CHECK_LIB(readline, main, LIBREADLINE="$LIBREADLINE -lreadline",,
  506. "$LIBREADLINE")
  507. if test $ac_cv_lib_readline_main = no; then
  508. AC_MSG_ERROR([vtysh needs libreadline but was not found and usable on your system.])
  509. fi
  510. AC_CHECK_HEADER(readline/history.h)
  511. if test $ac_cv_header_readline_history_h = no;then
  512. AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
  513. fi
  514. AC_CHECK_LIB(readline, rl_completion_matches,
  515. LIBREADLINE="$LIBREADLINE",, "$LIBREADLINE")
  516. if test $ac_cv_lib_readline_rl_completion_matches = no; then
  517. AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
  518. fi
  519. ;;
  520. "no" ) VTYSH="";;
  521. * ) ;;
  522. esac
  523. AC_SUBST(LIBREADLINE)
  524. dnl ----------
  525. dnl PAM module
  526. dnl ----------
  527. if test "$with_libpam" = "yes"; then
  528. AC_CHECK_HEADER([security/pam_misc.h],
  529. [AC_DEFINE(HAVE_PAM_MISC_H,,Have pam_misc.h)
  530. AC_DEFINE(PAM_CONV_FUNC,misc_conv,Have misc_conv)
  531. pam_conv_func="misc_conv"
  532. ],
  533. [], QUAGGA_INCLUDES)
  534. AC_CHECK_HEADER([security/openpam.h],
  535. [AC_DEFINE(HAVE_OPENPAM_H,,Have openpam.h)
  536. AC_DEFINE(PAM_CONV_FUNC,openpam_ttyconv,Have openpam_ttyconv)
  537. pam_conv_func="openpam_ttyconv"
  538. ],
  539. [], QUAGGA_INCLUDES)
  540. if test -z "$ac_cv_header_security_pam_misc_h$ac_cv_header_security_openpam_h" ; then
  541. AC_MSG_WARN([*** pam support will not be built ***])
  542. with_libpam="no"
  543. fi
  544. fi
  545. if test "$with_libpam" = "yes"; then
  546. dnl took this test from proftpds configure.in and suited to our needs
  547. dnl -------------------------------------------------------------------------
  548. dnl
  549. dnl This next check looks funky due to a linker problem with some versions
  550. dnl of the PAM library. Prior to 0.72 release, the Linux PAM shared library
  551. dnl omitted requiring libdl linking information. PAM-0.72 or better ships
  552. dnl with RedHat 6.2 and Debian 2.2 or better.
  553. AC_CHECK_LIB(pam, pam_start,
  554. [AC_CHECK_LIB(pam, $pam_conv_func,
  555. [AC_DEFINE(USE_PAM,,Use PAM for authentication)
  556. LIBPAM="-lpam"],
  557. [AC_DEFINE(USE_PAM,,Use PAM for authentication)
  558. LIBPAM="-lpam -lpam_misc"]
  559. )
  560. ],
  561. [AC_CHECK_LIB(pam, pam_end,
  562. [AC_CHECK_LIB(pam, $pam_conv_func,
  563. [AC_DEFINE(USE_PAM,,Use PAM for authentication)
  564. LIBPAM="-lpam -ldl"],
  565. [AC_DEFINE(USE_PAM,,Use PAM for authentication)
  566. LIBPAM="-lpam -ldl -lpam_misc"]
  567. )
  568. ],AC_MSG_WARN([*** pam support will not be built ***]),
  569. [-ldl])
  570. ]
  571. )
  572. fi
  573. AC_SUBST(LIBPAM)
  574. dnl -------------------------------
  575. dnl Endian-ness check
  576. dnl -------------------------------
  577. AC_WORDS_BIGENDIAN
  578. dnl -------------------------------
  579. dnl check the size in byte of the C
  580. dnl -------------------------------
  581. dnl AC_CHECK_SIZEOF(char)
  582. dnl AC_CHECK_SIZEOF(int)
  583. dnl AC_CHECK_SIZEOF(short)
  584. dnl AC_CHECK_SIZEOF(long)
  585. dnl ----------------------------
  586. dnl check existance of functions
  587. dnl ----------------------------
  588. AC_FUNC_CHOWN
  589. AC_FUNC_FNMATCH
  590. AC_FUNC_FORK
  591. AC_FUNC_MALLOC
  592. AC_FUNC_MEMCMP
  593. AC_FUNC_MKTIME
  594. AC_FUNC_STRFTIME
  595. AC_FUNC_REALLOC
  596. AC_FUNC_STAT
  597. AC_FUNC_SELECT_ARGTYPES
  598. AC_FUNC_STRFTIME
  599. dnl Avoid AC_FUNC_STRNLEN because it pulls in AC_SYSTEM_EXTENSIONS which
  600. dnl can lead to strange side effects. So we just check for strnlen
  601. dnl directly, see below.
  602. dnl AC_FUNC_STRNLENdnl
  603. AC_FUNC_VPRINTF
  604. dnl -------------------------------
  605. dnl bgpd needs pow() and hence libm
  606. dnl -------------------------------
  607. TMPLIBS="$LIBS"
  608. AC_CHECK_HEADER([math.h],
  609. [AC_CHECK_LIB([m], [pow],
  610. [LIBM="-lm"
  611. LIBS="$LIBS $LIBM"
  612. AC_DEFINE(HAVE_LIBM,, Have libm)
  613. AC_CHECK_FUNCS(pow,[],[LIBM=""])
  614. ])
  615. ])
  616. if test x"$LIBM" = x ; then
  617. AC_MSG_WARN([Unable to find working pow function - bgpd may not link])
  618. fi
  619. LIBS="$TMPLIBS"
  620. AC_SUBST(LIBM)
  621. dnl ---------------
  622. dnl other functions
  623. dnl ---------------
  624. AC_CHECK_FUNCS([dup2 ftruncate getcwd gethostbyname getpagesize gettimeofday \
  625. inet_ntoa inet_aton strnlen \
  626. memchr memmove memset select socket \
  627. strcasecmp strchr strcspn strdup strerror \
  628. strncasecmp strndup strrchr strspn strstr \
  629. strtol strtoul strlcat strlcpy \
  630. daemon snprintf vsnprintf \
  631. if_nametoindex if_indextoname getifaddrs \
  632. uname fcntl])
  633. AC_CHECK_FUNCS(setproctitle, ,
  634. [AC_CHECK_LIB(util, setproctitle,
  635. [LIBS="$LIBS -lutil"
  636. AC_DEFINE(HAVE_SETPROCTITLE,, Have setproctitle)
  637. ]
  638. )
  639. ]
  640. )
  641. dnl ------------------------------------
  642. dnl Determine routing get and set method
  643. dnl ------------------------------------
  644. AC_MSG_CHECKING(zebra between kernel interface method)
  645. if test x"$opsys" = x"gnu-linux"; then
  646. if test "${enable_netlink}" = "yes";then
  647. AC_MSG_RESULT(netlink)
  648. RT_METHOD=rt_netlink.o
  649. AC_DEFINE(HAVE_NETLINK,,netlink)
  650. netlink=yes
  651. elif test "${enable_netlink}" = "no"; then
  652. AC_MSG_RESULT(ioctl)
  653. RT_METHOD=rt_ioctl.o
  654. netlink=no
  655. else
  656. AC_MSG_RESULT(netlink)
  657. RT_METHOD=rt_netlink.o
  658. AC_DEFINE(HAVE_NETLINK,,netlink)
  659. netlink=yes
  660. fi
  661. elif test x"$opsys" = x"sol2-6";then
  662. AC_MSG_RESULT(Route socket)
  663. KERNEL_METHOD="kernel_socket.o"
  664. RT_METHOD="rt_socket.o"
  665. elif test x"$opsys" = x"sol8";then
  666. AC_MSG_RESULT(Route socket)
  667. KERNEL_METHOD="kernel_socket.o"
  668. RT_METHOD="rt_socket.o"
  669. elif test "$opsys" = "irix" ; then
  670. AC_MSG_RESULT(Route socket)
  671. KERNEL_METHOD="kernel_socket.o"
  672. RT_METHOD="rt_socket.o"
  673. else
  674. AC_TRY_RUN([#include <errno.h>
  675. #include <sys/types.h>
  676. #include <sys/socket.h>
  677. main ()
  678. {
  679. int ac_sock;
  680. ac_sock = socket (AF_ROUTE, SOCK_RAW, 0);
  681. if (ac_sock < 0 && errno == EINVAL)
  682. exit (1);
  683. exit (0);
  684. }],
  685. [KERNEL_METHOD=kernel_socket.o
  686. RT_METHOD=rt_socket.o
  687. AC_MSG_RESULT(socket)],
  688. [RT_METHOD=rt_ioctl.o
  689. AC_MSG_RESULT(ioctl)],
  690. [KERNEL_METHOD=kernel_socket.o
  691. RT_METHOD=rt_socket.o
  692. AC_MSG_RESULT(socket)])
  693. fi
  694. AC_SUBST(RT_METHOD)
  695. AC_SUBST(KERNEL_METHOD)
  696. AC_SUBST(OTHER_METHOD)
  697. dnl --------------------------
  698. dnl Determine IS-IS I/O method
  699. dnl --------------------------
  700. AC_CHECK_HEADER(net/bpf.h)
  701. AC_CHECK_HEADER(sys/dlpi.h)
  702. AC_MSG_CHECKING(zebra IS-IS I/O method)
  703. if test x"$opsys" = x"gnu-linux"; then
  704. AC_MSG_RESULT(pfpacket)
  705. ISIS_METHOD=isis_pfpacket.o
  706. elif test x"$opsys" = x"sol2-6" -o x"$opsys" = x"sol8"; then
  707. AC_MSG_RESULT(DLPI)
  708. ISIS_METHOD="isis_dlpi.o"
  709. else
  710. if test $ac_cv_header_net_bpf_h = no; then
  711. if test $ac_cv_header_sys_dlpi_h = no; then
  712. AC_MSG_RESULT(none)
  713. AC_MSG_WARN([*** IS-IS support will not be built ***])
  714. ISISD=""
  715. else
  716. AC_MSG_RESULT(DLPI)
  717. fi
  718. ISIS_METHOD="isis_dlpi.o"
  719. else
  720. AC_MSG_RESULT(BPF)
  721. ISIS_METHOD="isis_bpf.o"
  722. fi
  723. fi
  724. AC_SUBST(ISIS_METHOD)
  725. dnl ------------------------------------
  726. dnl check for broken CMSG_FIRSTHDR macro
  727. dnl ------------------------------------
  728. AC_MSG_CHECKING(for broken CMSG_FIRSTHDR)
  729. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  730. #ifdef SUNOS_5
  731. #define _XPG4_2
  732. #define __EXTENSIONS__
  733. #endif
  734. #ifdef HAVE_STDLIB_H
  735. # include <stdlib.h>
  736. #endif
  737. #ifdef HAVE_SYS_TYPES_H
  738. #include <sys/types.h>
  739. #endif
  740. #ifdef HAVE_SYS_SOCKET_H
  741. #include <sys/socket.h>
  742. #endif
  743. main()
  744. {
  745. struct msghdr msg;
  746. char buf[4];
  747. msg.msg_control = buf;
  748. msg.msg_controllen = 0;
  749. if (CMSG_FIRSTHDR(&msg) != NULL)
  750. exit(0);
  751. exit (1);
  752. }]])],[AC_MSG_RESULT(yes - using workaround) AC_DEFINE(HAVE_BROKEN_CMSG_FIRSTHDR,,Broken CMSG_FIRSTHDR)],
  753. [AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
  754. dnl ------------------------------
  755. dnl check kernel route read method
  756. dnl ------------------------------
  757. AC_CACHE_CHECK(route read method check, zebra_rtread,
  758. [if test "$netlink" = yes; then
  759. RTREAD_METHOD="rtread_netlink.o"
  760. zebra_rtread="netlink"
  761. else
  762. for zebra_rtread in /proc/net/route /dev/ip /dev/null;
  763. do
  764. test x`ls $zebra_rtread 2>/dev/null` = x"$zebra_rtread" && break
  765. done
  766. case $zebra_rtread in
  767. "/proc/net/route") RTREAD_METHOD="rtread_proc.o"
  768. zebra_rtread="proc";;
  769. "/dev/ip")
  770. case "$host" in
  771. *-freebsd*) RTREAD_METHOD=rtread_sysctl.o
  772. zebra_rtread="sysctl";;
  773. *) RTREAD_METHOD="rtread_getmsg.o"
  774. zebra_rtread="getmsg";;
  775. esac;;
  776. *) RTREAD_METHOD="rtread_sysctl.o"
  777. zebra_rtread="sysctl";;
  778. esac
  779. fi])
  780. AC_SUBST(RTREAD_METHOD)
  781. dnl -----------------------------
  782. dnl check interface lookup method
  783. dnl -----------------------------
  784. IOCTL_METHOD=ioctl.o
  785. AC_MSG_CHECKING(interface looking up method)
  786. if test "$netlink" = yes; then
  787. AC_MSG_RESULT(netlink)
  788. IF_METHOD=if_netlink.o
  789. elif test "$opsys" = "sol2-6";then
  790. AC_MSG_RESULT(Solaris GIF)
  791. IF_METHOD=if_ioctl.o
  792. elif test "$opsys" = "sol8";then
  793. AC_MSG_RESULT(Solaris GLIF)
  794. IF_METHOD=if_ioctl_solaris.o
  795. IOCTL_METHOD=ioctl_solaris.o
  796. elif test "$opsys" = "irix" ; then
  797. AC_MSG_RESULT(IRIX)
  798. IF_METHOD=if_ioctl.o
  799. elif test "$opsys" = "openbsd";then
  800. AC_MSG_RESULT(openbsd)
  801. IF_METHOD=if_ioctl.o
  802. elif grep NET_RT_IFLIST /usr/include/sys/socket.h >/dev/null 2>&1; then
  803. AC_MSG_RESULT(sysctl)
  804. IF_METHOD=if_sysctl.o
  805. AC_DEFINE(HAVE_NET_RT_IFLIST,,NET_RT_IFLIST)
  806. else
  807. AC_MSG_RESULT(ioctl)
  808. IF_METHOD=if_ioctl.o
  809. fi
  810. AC_SUBST(IF_METHOD)
  811. AC_SUBST(IOCTL_METHOD)
  812. dnl ---------------------------------------------------------------
  813. dnl figure out how to specify an interface in multicast sockets API
  814. dnl ---------------------------------------------------------------
  815. AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [], [], QUAGGA_INCLUDES)
  816. AC_MSG_CHECKING([for BSD struct ip_mreq hack])
  817. AC_TRY_COMPILE([#ifdef HAVE_SYS_PARAM_H
  818. #include <sys/param.h>
  819. #endif],[#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500022 || (__FreeBSD_version < 500000 && __FreeBSD_version >= 440000))) || (defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 106010000)
  820. return (0);
  821. #else
  822. #error No support for BSD struct ip_mreq hack detected
  823. #endif],[AC_MSG_RESULT(yes)
  824. AC_DEFINE(HAVE_BSD_STRUCT_IP_MREQ_HACK,,[Can pass ifindex in struct ip_mreq])],
  825. AC_MSG_RESULT(no))
  826. dnl ---------------------------------------------------------------
  827. dnl figure out how to check link-state
  828. dnl ---------------------------------------------------------------
  829. AC_CHECK_HEADER([net/if.h],
  830. [AC_CHECK_HEADER( [net/if_media.h],
  831. [m4_define([LINK_DETECT_INCLUDES],
  832. QUAGGA_INCLUDES
  833. [#include <net/if_media.h>
  834. ])
  835. AC_CHECK_MEMBERS( [struct ifmediareq.ifm_status],
  836. AC_DEFINE(HAVE_BSD_LINK_DETECT,,[BSD link-detect]),
  837. [], LINK_DETECT_INCLUDES)],
  838. [],
  839. QUAGGA_INCLUDES)],
  840. [], QUAGGA_INCLUDES )
  841. dnl ------------------------
  842. dnl TCP_MD5SIG socket option
  843. dnl ------------------------
  844. AC_CHECK_HEADER([netinet/tcp.h],
  845. [m4_define([MD5_INCLUDES],
  846. QUAGGA_INCLUDES
  847. [#include <netinet/tcp.h>
  848. ])
  849. AC_CHECK_DECLS([TCP_MD5SIG], [], [], MD5_INCLUDES)],
  850. [],
  851. QUAGGA_INCLUDES)
  852. if test $ac_cv_have_decl_TCP_MD5SIG = no; then
  853. AC_CHECK_HEADER([linux/tcp.h],
  854. [m4_define([MD5_INCLUDES],
  855. QUAGGA_INCLUDES
  856. [#include <linux/tcp.h>
  857. ])
  858. AC_CHECK_DECLS([TCP_MD5SIG], [], [], MD5_INCLUDES)])
  859. fi
  860. dnl -----------------------
  861. dnl check proc file system.
  862. dnl -----------------------
  863. if test -r /proc/net/dev; then
  864. AC_DEFINE(HAVE_PROC_NET_DEV,,/proc/net/dev)
  865. IF_PROC=if_proc.o
  866. fi
  867. if test -r /proc/net/if_inet6; then
  868. AC_DEFINE(HAVE_PROC_NET_IF_INET6,,/proc/net/if_inet6)
  869. IF_PROC=if_proc.o
  870. fi
  871. AC_SUBST(IF_PROC)
  872. dnl -----------------------------
  873. dnl check ipforward detect method
  874. dnl -----------------------------
  875. AC_CACHE_CHECK(ipforward method check, zebra_ipforward_path,
  876. [for zebra_ipforward_path in /proc/net/snmp /dev/ip /dev/null;
  877. do
  878. test x`ls $zebra_ipforward_path 2>/dev/null` = x"$zebra_ipforward_path" && break
  879. done
  880. case $zebra_ipforward_path in
  881. "/proc/net/snmp") IPFORWARD=ipforward_proc.o
  882. zebra_ipforward_path="proc";;
  883. "/dev/ip")
  884. case "$host" in
  885. *-nec-sysv4*) IPFORWARD=ipforward_ews.o
  886. zebra_ipforward_path="ews";;
  887. *-freebsd*) IPFORWARD=ipforward_sysctl.o
  888. zebra_ipforward_path="sysctl";;
  889. *) IPFORWARD=ipforward_solaris.o
  890. zebra_ipforward_path="solaris";;
  891. esac;;
  892. *) IPFORWARD=ipforward_sysctl.o
  893. zebra_ipforward_path="sysctl";;
  894. esac])
  895. AC_SUBST(IPFORWARD)
  896. AC_CHECK_FUNCS(getaddrinfo, [have_getaddrinfo=yes], [have_getaddrinfo=no])
  897. dnl ----------
  898. dnl IPv6 check
  899. dnl ----------
  900. AC_MSG_CHECKING(whether does this OS have IPv6 stack)
  901. if test "${enable_ipv6}" = "no"; then
  902. AC_MSG_RESULT(disabled)
  903. else
  904. dnl ----------
  905. dnl INRIA IPv6
  906. dnl ----------
  907. if grep IPV6_INRIA_VERSION /usr/include/netinet/in.h >/dev/null 2>&1; then
  908. zebra_cv_ipv6=yes
  909. AC_DEFINE(HAVE_IPV6,1,INRIA IPv6)
  910. AC_DEFINE(INRIA_IPV6,1,INRIA IPv6)
  911. RIPNGD="ripngd"
  912. OSPF6D="ospf6d"
  913. LIB_IPV6=""
  914. AC_MSG_RESULT(INRIA IPv6)
  915. dnl ---------
  916. dnl KAME IPv6
  917. dnl ---------
  918. elif grep WIDE /usr/include/netinet6/in6.h >/dev/null 2>&1; then
  919. zebra_cv_ipv6=yes
  920. AC_DEFINE(HAVE_IPV6,1,KAME IPv6)
  921. AC_DEFINE(KAME,1,KAME IPv6)
  922. RIPNGD="ripngd"
  923. OSPF6D="ospf6d"
  924. if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
  925. LIB_IPV6="-L/usr/local/v6/lib -linet6"
  926. fi
  927. AC_MSG_RESULT(KAME)
  928. dnl -------------------------
  929. dnl MUSICA IPv6
  930. dnl default host check
  931. dnl It is not used by Kheops
  932. dnl -------------------------
  933. elif grep MUSICA /usr/include6/netinet6/in6.h >/dev/null 2>&1; then
  934. zebra_cv_ipv6=yes
  935. AC_DEFINE(HAVE_IPV6,1,Musicia IPv6)
  936. AC_DEFINE(MUSICA,1,Musica IPv6 stack)
  937. AC_DEFINE(KAME,1,KAME IPv6 stack)
  938. RIPNGD="ripngd"
  939. OSPF6D="ospf6d"
  940. if test -d /usr/local/v6/lib -a -f /usr/local/v6/lib/libinet6.a; then
  941. LIB_IPV6="-L/usr/local/v6/lib -linet6"
  942. fi
  943. AC_MSG_RESULT(MUSICA)
  944. dnl ---------
  945. dnl NRL check
  946. dnl ---------
  947. elif grep NRL /usr/include/netinet6/in6.h >/dev/null 2>&1; then
  948. zebra_cv_ipv6=yes
  949. AC_DEFINE(HAVE_IPV6,1,NRL IPv6)
  950. AC_DEFINE(NRL,1,NRL)
  951. RIPNGD="ripngd"
  952. OSPF6D="ospf6d"
  953. if test x"$opsys" = x"bsdi";then
  954. AC_DEFINE(BSDI_NRL,,BSDI)
  955. AC_MSG_RESULT(BSDI_NRL)
  956. else
  957. AC_MSG_RESULT(NRL)
  958. fi
  959. dnl ------------------------------------
  960. dnl Solaris 9, 10 and potentially higher
  961. dnl ------------------------------------
  962. elif test x"$opsys" = x"sol8"; then
  963. zebra_cv_ipv6=yes;
  964. AC_DEFINE(HAVE_IPV6, 1, IPv6)
  965. AC_DEFINE(SOLARIS_IPV6, 1, Solaris IPv6)
  966. RIPNGD="ripngd"
  967. OSPF6D="ospf6d"
  968. AC_MSG_RESULT(Solaris IPv6)
  969. dnl ----------
  970. dnl Linux IPv6
  971. dnl ----------
  972. elif test "${enable_ipv6}" = "yes"; then
  973. AC_EGREP_CPP(yes, [
  974. #include <linux/version.h>
  975. /* 2.1.128 or later */
  976. #if LINUX_VERSION_CODE >= 0x020180
  977. yes
  978. #endif],
  979. [zebra_cv_ipv6=yes
  980. zebra_cv_linux_ipv6=yes
  981. AC_MSG_RESULT(Linux IPv6)])
  982. else
  983. if test x`ls /proc/net/ipv6_route 2>/dev/null` = x"/proc/net/ipv6_route"
  984. then
  985. zebra_cv_ipv6=yes
  986. zebra_cv_linux_ipv6=yes
  987. AC_MSG_RESULT(Linux IPv6)
  988. fi
  989. fi
  990. if test "$zebra_cv_linux_ipv6" = "yes";then
  991. AC_MSG_CHECKING(whether libc has IPv6 support)
  992. AC_TRY_LINK([#include <netinet/in.h>
  993. ],[ int a; a = (int) in6addr_any.s6_addr[0]; if (a != 12345) return a; ],
  994. [AC_MSG_RESULT(yes)
  995. zebra_cv_ipv6=yes
  996. zebra_cv_linux_ipv6=yes],
  997. [AC_MSG_RESULT(no)
  998. zebra_cv_ipv6=no
  999. zebra_cv_linux_ipv6=no])
  1000. fi
  1001. if test "$zebra_cv_linux_ipv6" = "yes";then
  1002. AC_MSG_CHECKING(for GNU libc >= 2.1)
  1003. AC_DEFINE(HAVE_IPV6,1,Linux IPv6)
  1004. AC_EGREP_CPP(yes, [
  1005. #include <features.h>
  1006. #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
  1007. yes
  1008. #endif],
  1009. [glibc=yes
  1010. AC_DEFINE(LINUX_IPV6,1,Linux IPv6 stack)
  1011. AC_MSG_RESULT(yes)],
  1012. AC_MSG_RESULT(no)
  1013. )
  1014. RIPNGD="ripngd"
  1015. OSPF6D="ospf6d"
  1016. if test "$glibc" != "yes"; then
  1017. INCLUDES="-I/usr/inet6/include"
  1018. if test x`ls /usr/inet6/lib/libinet6.a 2>/dev/null` != x;then
  1019. LIB_IPV6="-L/usr/inet6/lib -linet6"
  1020. fi
  1021. fi
  1022. fi
  1023. dnl -----------------------
  1024. dnl Set IPv6 related values
  1025. dnl -----------------------
  1026. LIBS="$LIB_IPV6 $LIBS"
  1027. AC_SUBST(LIB_IPV6)
  1028. if test x"$RIPNGD" = x""; then
  1029. AC_MSG_RESULT(IPv4 only)
  1030. fi
  1031. fi
  1032. dnl ------------------
  1033. dnl IPv6 header checks
  1034. dnl ------------------
  1035. if test "x${zebra_cv_ipv6}" = "xyes"; then
  1036. AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h netinet/icmp6.h \
  1037. netinet6/in6_var.h netinet6/nd6.h], [], [],
  1038. QUAGGA_INCLUDES)
  1039. fi
  1040. m4_define([QUAGGA_INCLUDES],dnl
  1041. QUAGGA_INCLUDES
  1042. [#if HAVE_NETINET6_IN6_H
  1043. #include <netinet6/in6.h>
  1044. #endif
  1045. #if HAVE_NETINET_IN6_VAR_H
  1046. #include <netinet/in6_var.h>
  1047. #endif
  1048. #if HAVE_NETINET_ICMP6_H
  1049. # include <netinet/icmp6.h>
  1050. #endif
  1051. #if HAVE_NETINET6_IN6_VAR_H
  1052. # include <netinet6/in6_var.h>
  1053. #endif
  1054. #if HAVE_NETINET6_ND6_H
  1055. # include <netinet6/nd6.h>
  1056. #endif
  1057. ])dnl
  1058. dnl --------------------
  1059. dnl Daemon disable check
  1060. dnl --------------------
  1061. if test "${enable_zebra}" = "no";then
  1062. ZEBRA=""
  1063. else
  1064. ZEBRA="zebra"
  1065. fi
  1066. if test "${enable_bgpd}" = "no";then
  1067. BGPD=""
  1068. else
  1069. BGPD="bgpd"
  1070. fi
  1071. if test "${enable_ripd}" = "no";then
  1072. RIPD=""
  1073. else
  1074. RIPD="ripd"
  1075. fi
  1076. if test "${enable_ospfd}" = "no";then
  1077. OSPFD=""
  1078. else
  1079. OSPFD="ospfd"
  1080. fi
  1081. if test "${enable_watchquagga}" = "no";then
  1082. WATCHQUAGGA=""
  1083. else
  1084. WATCHQUAGGA="watchquagga"
  1085. fi
  1086. OSPFCLIENT=""
  1087. if test "${enable_opaque_lsa}" = "yes"; then
  1088. if test "${enable_ospfapi}" != "no";then
  1089. AC_DEFINE(SUPPORT_OSPF_API,,OSPFAPI)
  1090. if test "${enable_ospfclient}" != "no";then
  1091. OSPFCLIENT="ospfclient"
  1092. fi
  1093. fi
  1094. fi
  1095. case "${enable_ripngd}" in
  1096. "yes") RIPNGD="ripngd";;
  1097. "no" ) RIPNGD="";;
  1098. * ) ;;
  1099. esac
  1100. case "${enable_ospf6d}" in
  1101. "yes") OSPF6D="ospf6d";;
  1102. "no" ) OSPF6D="";;
  1103. * ) ;;
  1104. esac
  1105. case "${enable_isisd}" in
  1106. "yes") ISISD="isisd";;
  1107. "no" ) ISISD="";;
  1108. * ) ;;
  1109. esac
  1110. # XXX Perhaps auto-enable on Solaris, but that's messy for cross builds.
  1111. case "${enable_solaris}" in
  1112. "yes") SOLARIS="solaris";;
  1113. "no" ) SOLARIS="";;
  1114. * ) ;;
  1115. esac
  1116. if test "${enable_bgp_announce}" = "no";then
  1117. AC_DEFINE(DISABLE_BGP_ANNOUNCE,1,Disable BGP installation to zebra)
  1118. else
  1119. AC_DEFINE(DISABLE_BGP_ANNOUNCE,0,Disable BGP installation to zebra)
  1120. fi
  1121. AC_SUBST(ZEBRA)
  1122. AC_SUBST(BGPD)
  1123. AC_SUBST(RIPD)
  1124. AC_SUBST(RIPNGD)
  1125. AC_SUBST(OSPFD)
  1126. AC_SUBST(OSPF6D)
  1127. AC_SUBST(WATCHQUAGGA)
  1128. AC_SUBST(ISISD)
  1129. AC_SUBST(SOLARIS)
  1130. AC_SUBST(VTYSH)
  1131. AC_SUBST(INCLUDES)
  1132. AC_SUBST(CURSES)
  1133. AC_SUBST(OSPFCLIENT)
  1134. AC_SUBST(OSPFAPI)
  1135. AC_CHECK_LIB(c, inet_ntop, [AC_DEFINE(HAVE_INET_NTOP,,inet_ntop)])
  1136. AC_CHECK_LIB(c, inet_pton, [AC_DEFINE(HAVE_INET_PTON,,inet_pton)])
  1137. AC_CHECK_LIB(crypt, crypt)
  1138. AC_CHECK_LIB(resolv, res_init)
  1139. dnl ---------------------------------------------------
  1140. dnl BSD/OS 4.1 define inet_XtoY function as __inet_XtoY
  1141. dnl ---------------------------------------------------
  1142. AC_CHECK_FUNC(__inet_ntop, AC_DEFINE(HAVE_INET_NTOP,,__inet_ntop))
  1143. AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton))
  1144. AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton))
  1145. dnl ---------------------------
  1146. dnl check system has GNU regexp
  1147. dnl ---------------------------
  1148. dnl AC_MSG_CHECKING(whether system has GNU regex)
  1149. AC_CHECK_LIB(c, regexec,
  1150. [AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library)
  1151. LIB_REGEX=""],
  1152. [LIB_REGEX="regex.o"])
  1153. AC_SUBST(LIB_REGEX)
  1154. dnl ------------------
  1155. dnl check Net-SNMP library
  1156. dnl ------------------
  1157. if test "${enable_snmp}" = "yes"; then
  1158. LIBS="${LIBS} -lcrypto"
  1159. AC_CHECK_LIB(netsnmp, asn_parse_int,
  1160. [AC_DEFINE(HAVE_NETSNMP,,Net SNMP)
  1161. AC_DEFINE(HAVE_SNMP,,SNMP)
  1162. LIBS="${LIBS} -lnetsnmp"],
  1163. [AC_MSG_ERROR([--enable-snmp given, but cannot find support for SNMP])])
  1164. for ac_snmp in /usr/include \
  1165. /usr/local/include \
  1166. /dev/null; do
  1167. test -f "${ac_snmp}/net-snmp/library/asn1.h" && break
  1168. done
  1169. case ${ac_snmp} in
  1170. /dev/null)
  1171. AC_MSG_ERROR([--enable-snmp given, but can not find header])
  1172. ;;
  1173. *)
  1174. SNMP_INCLUDES="-I${ac_snmp}/net-snmp"
  1175. SNMP_INCLUDES="${SNMP_INCLUDES} -I${ac_snmp}/net-snmp/library"
  1176. ;;
  1177. esac
  1178. AC_SUBST(SNMP_INCLUDES)
  1179. fi
  1180. dnl ---------------------------
  1181. dnl sockaddr and netinet checks
  1182. dnl ---------------------------
  1183. AC_CHECK_TYPES([struct sockaddr, struct sockaddr_in,
  1184. struct sockaddr_in6, struct sockaddr_un, struct sockaddr_dl,
  1185. socklen_t,
  1186. struct ifaliasreq, struct if6_aliasreq, struct in6_aliasreq,
  1187. struct nd_opt_adv_interval, struct rt_addrinfo,
  1188. struct nd_opt_homeagent_info, struct nd_opt_adv_interval],
  1189. [], [], QUAGGA_INCLUDES)
  1190. AC_CHECK_MEMBERS([struct sockaddr.sa_len,
  1191. struct sockaddr_in.sin_len, struct sockaddr_un.sun_len,
  1192. struct sockaddr_in6.sin6_scope_id,
  1193. struct if6_aliasreq.ifra_lifetime,
  1194. struct nd_opt_adv_interval.nd_opt_ai_type],
  1195. [], [], QUAGGA_INCLUDES)
  1196. dnl ---------------------------
  1197. dnl IRDP/pktinfo/icmphdr checks
  1198. dnl ---------------------------
  1199. AC_CHECK_TYPES([struct in_pktinfo],
  1200. [AC_CHECK_TYPES([struct icmphdr],
  1201. [if test "${enable_irdp}" != "no"; then
  1202. AC_DEFINE(HAVE_IRDP,, IRDP)
  1203. fi],
  1204. [if test "${enable_irdp}" = "yes"; then
  1205. AC_MSG_ERROR(['IRDP requires in_pktinfo at the moment!'])
  1206. fi], [QUAGGA_INCLUDES])],
  1207. [if test "${enable_irdp}" = "yes"; then
  1208. AC_MSG_ERROR(['IRDP requires in_pktinfo at the moment!'])
  1209. fi], [QUAGGA_INCLUDES])
  1210. dnl --------------------------------------
  1211. dnl checking for getrusage struct and call
  1212. dnl --------------------------------------
  1213. AC_MSG_CHECKING(whether getrusage is available)
  1214. AC_TRY_COMPILE([#include <sys/resource.h>
  1215. ],[struct rusage ac_x; getrusage (RUSAGE_SELF, &ac_x);],
  1216. [AC_MSG_RESULT(yes)
  1217. AC_DEFINE(HAVE_RUSAGE,,rusage)],
  1218. AC_MSG_RESULT(no))
  1219. dnl -------------------
  1220. dnl capabilities checks
  1221. dnl -------------------
  1222. if test "${enable_capabilities}" != "no"; then
  1223. AC_MSG_CHECKING(whether prctl PR_SET_KEEPCAPS is available)
  1224. AC_TRY_COMPILE([#include <sys/prctl.h>],[prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);],
  1225. [AC_MSG_RESULT(yes)
  1226. AC_DEFINE(HAVE_PR_SET_KEEPCAPS,,prctl)
  1227. quagga_ac_keepcaps="yes"],
  1228. AC_MSG_RESULT(no)
  1229. )
  1230. if test x"${quagga_ac_keepcaps}" = x"yes"; then
  1231. AC_CHECK_HEADERS(sys/capability.h)
  1232. fi
  1233. if test x"${ac_cv_header_sys_capability_h}" = x"yes"; then
  1234. AC_CHECK_LIB(cap, cap_init,
  1235. [AC_DEFINE(HAVE_LCAPS,1,Capabilities)
  1236. LIBCAP="-lcap"
  1237. quagga_ac_lcaps="yes"]
  1238. )
  1239. else
  1240. AC_CHECK_HEADERS(priv.h,
  1241. [AC_MSG_CHECKING(Solaris style privileges are available)
  1242. AC_TRY_COMPILE([#include <priv.h>],[getpflags(PRIV_AWARE);],
  1243. [AC_MSG_RESULT(yes)
  1244. AC_DEFINE(HAVE_SOLARIS_CAPABILITIES,1,getpflags)
  1245. quagga_ac_scaps="yes"],
  1246. AC_MSG_RESULT(no)
  1247. )
  1248. ]
  1249. )
  1250. fi
  1251. if test x"${quagga_ac_scaps}" = x"yes" \
  1252. -o x"${quagga_ac_lcaps}" = x"yes"; then
  1253. AC_DEFINE(HAVE_CAPABILITIES,1,capabilities)
  1254. fi
  1255. fi
  1256. AC_SUBST(LIBCAP)
  1257. dnl ---------------------------
  1258. dnl check for glibc 'backtrace'
  1259. dnl ---------------------------
  1260. if test "${glibc}" = "yes"; then
  1261. AC_CHECK_HEADER([execinfo.h],
  1262. [AC_CHECK_FUNC([backtrace],
  1263. [AC_DEFINE(HAVE_GLIBC_BACKTRACE,,[Glibc backtrace])
  1264. AC_DEFINE(HAVE_STACK_TRACE,,[Stack symbol decoding])
  1265. ])
  1266. ])
  1267. fi
  1268. dnl -----------------------------------------
  1269. dnl check for malloc mallinfo struct and call
  1270. dnl this must try and link using LIBS, in
  1271. dnl order to check no alternative allocator
  1272. dnl has been specified, which might not provide
  1273. dnl mallinfo, e.g. such as Umem on Solaris.
  1274. dnl -----------------------------------------
  1275. AC_CHECK_HEADER([malloc.h],
  1276. [AC_MSG_CHECKING(whether mallinfo is available)
  1277. AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
  1278. [[struct mallinfo ac_x; ac_x = mallinfo ();]])],
  1279. [AC_MSG_RESULT(yes)
  1280. AC_DEFINE(HAVE_MALLINFO,,mallinfo)],
  1281. AC_MSG_RESULT(no)
  1282. )
  1283. ], [], QUAGGA_INCLUDES)
  1284. dnl ----------
  1285. dnl configure date
  1286. dnl ----------
  1287. CONFDATE=`date '+%Y%m%d'`
  1288. AC_SUBST(CONFDATE)
  1289. dnl Conditionally enable PIE support for GNU toolchains.
  1290. enable_pie=yes
  1291. AC_ARG_ENABLE(pie, AS_HELP_STRING([--disable-pie], [Do not build tools as a Position Independent Executables]))
  1292. if test "$enable_pie" = "yes"; then
  1293. AC_CACHE_CHECK([whether $CC accepts PIE flags], [ap_cv_cc_pie], [
  1294. save_CFLAGS=$CFLAGS
  1295. save_LDFLAGS=$LDFLAGS
  1296. CFLAGS="$CFLAGS -fPIE"
  1297. LDFLAGS="$LDFLAGS -pie"
  1298. AC_LINK_IFELSE([AC_LANG_SOURCE([[static int foo[30000]; int main () { return 0; }]])],
  1299. [ap_cv_cc_pie=yes], [ap_cv_cc_pie=no]
  1300. )
  1301. CFLAGS=$save_CFLAGS
  1302. LDFLAGS=$save_LDFLAGS
  1303. ])
  1304. if test "$ap_cv_cc_pie" = "yes"; then
  1305. PICFLAGS="-fPIE"
  1306. PILDFLAGS="-pie"
  1307. fi
  1308. fi
  1309. AC_SUBST(PICFLAGS)
  1310. AC_SUBST(PILDFLAGS)
  1311. dnl ------------------------------
  1312. dnl set paths for state directory
  1313. dnl ------------------------------
  1314. if test "${prefix}" = "NONE"; then
  1315. quagga_statedir_prefix="";
  1316. else
  1317. quagga_statedir_prefix=${prefix}
  1318. fi
  1319. if test "${localstatedir}" = '${prefix}/var'; then
  1320. AC_CACHE_CHECK(state directory,ac_statedir,
  1321. [for QUAGGA_STATE_DIR in ${quagga_statedir_prefix}/var/run dnl
  1322. ${quagga_statedir_prefix}/var/adm dnl
  1323. ${quagga_statedir_prefix}/etc dnl
  1324. /var/run dnl
  1325. /var/adm dnl
  1326. /etc dnl
  1327. /dev/null;
  1328. do
  1329. test -d $QUAGGA_STATE_DIR && break
  1330. done
  1331. quagga_statedir=$QUAGGA_STATE_DIR])
  1332. else
  1333. quagga_statedir=${localstatedir}
  1334. AC_MSG_CHECKING(directory to use for state file)
  1335. AC_MSG_RESULT(${quagga_statedir})
  1336. AC_SUBST(quagga_statedir)
  1337. fi
  1338. if test $quagga_statedir = "/dev/null"; then
  1339. AC_MSG_ERROR('STATE DIRECTORY NOT FOUND! FIX OR SPECIFY --localstatedir!')
  1340. fi
  1341. AC_DEFINE_UNQUOTED(PATH_ZEBRA_PID, "$quagga_statedir/zebra.pid",zebra PID)
  1342. AC_DEFINE_UNQUOTED(PATH_RIPD_PID, "$quagga_statedir/ripd.pid",ripd PID)
  1343. AC_DEFINE_UNQUOTED(PATH_RIPNGD_PID, "$quagga_statedir/ripngd.pid",ripngd PID)
  1344. AC_DEFINE_UNQUOTED(PATH_BGPD_PID, "$quagga_statedir/bgpd.pid",bgpd PID)
  1345. AC_DEFINE_UNQUOTED(PATH_OSPFD_PID, "$quagga_statedir/ospfd.pid",ospfd PID)
  1346. AC_DEFINE_UNQUOTED(PATH_OSPF6D_PID, "$quagga_statedir/ospf6d.pid",ospf6d PID)
  1347. AC_DEFINE_UNQUOTED(PATH_ISISD_PID, "$quagga_statedir/isisd.pid",isisd PID)
  1348. AC_DEFINE_UNQUOTED(PATH_WATCHQUAGGA_PID, "$quagga_statedir/watchquagga.pid",watchquagga PID)
  1349. AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$quagga_statedir/zserv.api",zebra api socket)
  1350. AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$quagga_statedir/zebra.vty",zebra vty socket)
  1351. AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$quagga_statedir/ripd.vty",rip vty socket)
  1352. AC_DEFINE_UNQUOTED(RIPNG_VTYSH_PATH, "$quagga_statedir/ripngd.vty",ripng vty socket)
  1353. AC_DEFINE_UNQUOTED(BGP_VTYSH_PATH, "$quagga_statedir/bgpd.vty",bgpd vty socket)
  1354. AC_DEFINE_UNQUOTED(OSPF_VTYSH_PATH, "$quagga_statedir/ospfd.vty",ospfd vty socket)
  1355. AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$quagga_statedir/ospf6d.vty",ospf6d vty socket)
  1356. AC_DEFINE_UNQUOTED(ISIS_VTYSH_PATH, "$quagga_statedir/isisd.vty",isisd vty socket)
  1357. AC_DEFINE_UNQUOTED(DAEMON_VTY_DIR, "$quagga_statedir",daemon vty directory)
  1358. dnl -------------------------------
  1359. dnl Quagga sources should always be
  1360. dnl current wrt interfaces. Dont
  1361. dnl allow deprecated interfaces to
  1362. dnl be exposed.
  1363. dnl -------------------------------
  1364. AC_DEFINE(QUAGGA_NO_DEPRECATED_INTERFACES, 1, Hide deprecated interfaces)
  1365. dnl ---------------------------
  1366. dnl Check htonl works correctly
  1367. dnl ---------------------------
  1368. AC_MSG_CHECKING(for working htonl)
  1369. AC_CACHE_VAL(ac_cv_htonl_works,
  1370. [AC_LINK_IFELSE([AC_LANG_PROGRAM([QUAGGA_INCLUDES],[htonl (0);])],
  1371. [ac_cv_htonl_works=yes], [ac_cv_htonl_works=no])
  1372. ]
  1373. )
  1374. AC_MSG_RESULT($ac_cv_htonl_works)
  1375. AC_CONFIG_FILES([Makefile lib/Makefile zebra/Makefile ripd/Makefile
  1376. ripngd/Makefile bgpd/Makefile ospfd/Makefile watchquagga/Makefile
  1377. ospf6d/Makefile isisd/Makefile vtysh/Makefile doc/Makefile
  1378. ospfclient/Makefile tests/Makefile m4/Makefile redhat/Makefile
  1379. pkgsrc/Makefile
  1380. redhat/quagga.spec
  1381. lib/version.h
  1382. doc/defines.texi
  1383. isisd/topology/Makefile
  1384. pkgsrc/bgpd.sh pkgsrc/ospf6d.sh pkgsrc/ospfd.sh
  1385. pkgsrc/ripd.sh pkgsrc/ripngd.sh pkgsrc/zebra.sh])
  1386. AC_CONFIG_FILES([solaris/Makefile])
  1387. AC_CONFIG_FILES([vtysh/extract.pl],[chmod +x vtysh/extract.pl])
  1388. ## Hack, but working solution to avoid rebuilding of quagga.info.
  1389. ## It's already in CVS until texinfo 4.7 is more common.
  1390. AC_OUTPUT
  1391. echo "
  1392. Quagga configuration
  1393. --------------------
  1394. quagga version : ${PACKAGE_VERSION}
  1395. host operationg system : ${host_os}
  1396. source code location : ${srcdir}
  1397. compiler : ${CC}
  1398. compiler flags : ${CFLAGS}
  1399. make : ${MAKE-make}
  1400. includes : ${INCLUDES} ${SNMP_INCLUDES}
  1401. linker flags : ${LDFLAGS} ${LIBS} ${LIBCAP} ${LIBREADLINE} ${LIBM}
  1402. state file directory : ${quagga_statedir}
  1403. config file directory : `eval echo \`echo ${sysconfdir}\``
  1404. example directory : `eval echo \`echo ${exampledir}\``
  1405. user to run as : ${enable_user}
  1406. group to run as : ${enable_group}
  1407. group for vty sockets : ${enable_vty_group}
  1408. config file mask : ${enable_configfile_mask}
  1409. log file mask : ${enable_logfile_mask}
  1410. The above user and group must have read/write access to the state file
  1411. directory and to the config files in the config file directory."
  1412. if test x"$quagga_cv_gnu_make" = x"no"; then echo "
  1413. Warning: The ${MAKE-make} programme detected, either in your path or
  1414. via the MAKE variable, is not GNU Make. GNU make may be installed as
  1415. gmake on some systems. and is required to complete a build of Quagga
  1416. " > /dev/stderr
  1417. fi