configure.ac 45 KB

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