14 AC_CHECK_PTHSEM(2.0.4,yes,yes,no)
15 AC_CHECK_HEADER(argp.h,,[AC_MSG_ERROR([argp_parse not found])])
16 AC_SEARCH_LIBS(argp_parse,argp,,[AC_MSG_ERROR([argp_parse not found])])
17 AC_CHECK_HEADER(linux/serial.h,[AC_DEFINE(HAVE_LINUX_LOWLATENCY, 1 , [Linux low latency mode enabled])],[AC_MSG_WARN([No supported low latency mode found])])
20 AC_CHECK_HEADER(linux/rtnetlink.h,[AC_DEFINE(HAVE_LINUX_NETLINK, 1,[Linux netlink layer available]) have_source_info=yes],[],[-])
21 AC_CHECK_HEADER(linux/usbdevice_fs.h,[AC_DEFINE(LINUX_API, 1, [Linux usb available]) have_linux_api=yes; have_usb=yes],[],[-])
22 AC_CHECK_HEADER(iphlpapi.h,[AC_DEFINE(HAVE_WINDOWS_IPHELPER, 1,[Windows IPHelper available])
23 LIBS="-liphlpapi $LIBS"; have_source_info=yes],[],[-])
25 have_bsd_source_info=no
26 AC_CHECK_DECL(__FREEBSD__,[have_bsd_source_info=yes],[],[])
27 AC_CHECK_DECL(__APPLE__,[have_bsd_source_info=yes],[],[])
28 if test x$have_bsd_source_info = xyes ; then
29 AC_DEFINE(HAVE_BSD_SOURCEINFO, 1,[FreeBSD compatible sourceinfo])
33 AC_CHECK_FUNCS(gethostbyname_r,,[AC_MSG_WARN([eibd client library not thread safe])])
35 AM_CONDITIONAL(LINUX_API, test x$have_linux_api = xyes)
37 AC_ARG_ENABLE(onlyeibd,
38 [ --enable-onlyeibd build only eibd (requires no libxml and m68hc05-gnu)],
39 [case "${enableval}" in
42 *) AC_MSG_ERROR(bad value ${enableval} for --enable-onlyeibd) ;;
43 esac],[onlyeibd=false])
44 AM_CONDITIONAL(HAVE_ONLYEIBD, test x$onlyeibd = xtrue)
46 if test x$onlyeibd = xfalse ; then
48 AM_PATH_XML2(2.6.16,,[AC_MSG_ERROR([limxml2 not found])])
49 AC_PATH_PROG(TAS,[m68hc05-as],,[$PATH:$bindir:$prefix/bin])
50 AC_PATH_PROG(TLD,[m68hc05-ld],,[$PATH:$bindir:$prefix/bin])
51 AC_PATH_PROG(TAR,[m68hc05-ar],,[$PATH:$bindir:$prefix/bin])
52 AC_PATH_PROG(TRANLIB,[m68hc05-ranlib],,[$PATH:$bindir:$prefix/bin])
53 AC_PATH_PROG(TGCC,[m68hc05-gcc],,[$PATH:$bindir:$prefix/bin])
55 test -z "$TAS" && AC_MSG_ERROR([m68hc05-as not found])
56 test -z "$TAR" && AC_MSG_ERROR([m68hc05-ar not found])
57 test -z "$TLD" && AC_MSG_ERROR([m68hc05-ld not found])
58 test -z "$TRANLIB" && AC_MSG_ERROR([m68hc05 ranlib not found])
59 test -z "$TGCC" && AC_MSG_ERROR([m68hc05 gcc not found])
64 [ --enable-ft12 enable FT1.2 backend],
65 [case "${enableval}" in
68 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ft12) ;;
70 AM_CONDITIONAL(HAVE_FT12, test x$ft12 = xtrue)
71 if test x$ft12 = xtrue ; then
72 AC_DEFINE(HAVE_FT12, 1 , [FT1.2 enabled])
76 [ --enable-pei16 enable BCU1 kernel driver backend],
77 [case "${enableval}" in
80 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pei16) ;;
82 AM_CONDITIONAL(HAVE_PEI16, test x$pei16 = xtrue)
83 if test x$pei16 = xtrue; then
84 AC_DEFINE(HAVE_PEI16, 1 , [PEI16 enabled])
88 [ --enable-tpuart enable TPUART kernel driver backend],
89 [case "${enableval}" in
92 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tpuart) ;;
94 AM_CONDITIONAL(HAVE_TPUART, test x$tpuart = xtrue)
95 if test x$tpuart = xtrue ; then
96 AC_DEFINE(HAVE_TPUART, 1 , [TPUART enabled])
100 [ --enable-pei16s enable BCU1 user driver backend (very experimental)],
101 [case "${enableval}" in
104 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pei16s) ;;
105 esac],[pei16s=false])
106 AM_CONDITIONAL(HAVE_PEI16s, test x$pei16s = xtrue)
107 if test x$pei16s = xtrue ; then
108 AC_DEFINE(HAVE_PEI16s, 1 , [PEI16s enabled])
111 AC_ARG_ENABLE(tpuarts,
112 [ --enable-tpuarts enable TPUART user driver backend (experimental)],
113 [case "${enableval}" in
116 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tpuarts) ;;
117 esac],[tpuarts=false])
118 AM_CONDITIONAL(HAVE_TPUARTs, test x$tpuarts = xtrue)
119 if test x$tpuarts = xtrue ; then
120 AC_DEFINE(HAVE_TPUARTs, 1 , [TPUARTs enabled])
123 AC_ARG_ENABLE(eibnetip,
124 [ --enable-eibnetip enable EIBnet/IP routing backend],
125 [case "${enableval}" in
126 yes) eibnetip=true ;;
127 no) eibnetip=false ;;
128 *) AC_MSG_ERROR(bad value ${enableval} for --enable-eibnetip) ;;
129 esac],[eibnetip=false])
130 AM_CONDITIONAL(HAVE_EIBNETIP, test x$eibnetip = xtrue)
131 if test x$eibnetip = xtrue ; then
132 AC_DEFINE(HAVE_EIBNETIP, 1 , [EIBnet/IP enabled])
135 AC_ARG_ENABLE(eibnetiptunnel,
136 [ --enable-eibnetiptunnel enable EIBnet/IP tunneling backend],
137 [case "${enableval}" in
138 yes) eibnetiptunnel=true ;;
139 no) eibnetiptunnel=false ;;
140 *) AC_MSG_ERROR(bad value ${enableval} for --enable-eibnetiptunnel) ;;
141 esac],[eibnetiptunnel=false])
142 AM_CONDITIONAL(HAVE_EIBNETIPTUNNEL, test x$eibnetiptunnel = xtrue)
143 if test x$eibnetiptunnel = xtrue ; then
144 if test x$have_source_info != xyes ; then
145 AC_MSG_ERROR(not all needed functions for EIBnet/IP tunneling backend available)
147 AC_DEFINE(HAVE_EIBNETIPTUNNEL, 1 , [EIBnet/IP tunneling enabled])
151 [ --enable-usb enable USB backend],
152 [case "${enableval}" in
155 *) AC_MSG_ERROR(bad value ${enableval} for --enable-usb) ;;
157 AM_CONDITIONAL(HAVE_USB, test x$usb = xtrue)
158 if test x$usb = xtrue ; then
159 if test x$have_usb != xyes ; then
160 AC_MSG_ERROR(not all needed functions for USB backend available)
162 AC_DEFINE(HAVE_USB, 1 , [USB backend enabled])
165 AC_ARG_ENABLE(eibnetipserver,
166 [ --enable-eibnetipserver enable EIBnet/IP server frontend],
167 [case "${enableval}" in
168 yes) eibnetipserver=true ;;
169 no) eibnetipserver=false ;;
170 *) AC_MSG_ERROR(bad value ${enableval} for --enable-eibnetipserver) ;;
171 esac],[eibnetipserver=false])
172 if test x$eibnetipserver = xtrue ; then
173 if test x$have_source_info != xyes ; then
174 AC_MSG_ERROR(not all needed functions for EIBnet/IP server available)
176 AC_DEFINE(HAVE_EIBNETIPSERVER, 1 , [EIBnet/IP server enabled])
179 AC_ARG_ENABLE(groupcache,
180 [ --enable-groupcache enable Group Cache (default: yes)],
181 [case "${enableval}" in
182 yes) groupcache=true ;;
183 no) groupcache=false ;;
184 *) AC_MSG_ERROR(bad value ${enableval} for --enable-groupcache) ;;
185 esac],[groupcache=true])
186 if test x$groupcache = xtrue ; then
187 AC_DEFINE(HAVE_GROUPCACHE, 1 , [Group Cache enabled])
191 AM_CONDITIONAL(HAVE_SOURCE_INFO, test x$have_source_info = xyes )
193 AC_CHECK_PROGS(INDENT, indent, no)
194 AC_CHECK_PROGS(JAR, fastjar jar, no)
195 AC_CHECK_PROGS(JAVAC, "gcj -C" javac, no)
198 [ --enable-java build java client library],
199 [case "${enableval}" in
200 yes) enablejava=true ;;
201 no) enablejava=false ;;
202 *) AC_MSG_ERROR(bad value ${enableval} for --enable-java) ;;
203 esac],[enablejava=false])
204 if test x$enablejava = xtrue ; then
205 AC_DEFINE(BUILD_JAVA, 1 , [building java client library])
207 if test x"$JAVAC" = xno ; then
208 AC_MSG_ERROR(no java compiler found)
211 if test x"$JAR" = xno ; then
212 AC_MSG_ERROR(jar not found)
217 AM_CONDITIONAL(BUILD_JAVA, test x$enablejava = xtrue )
219 AC_CHECK_MEMBER([struct sockaddr_in.sin_len],[AC_DEFINE(HAVE_SOCKADDR_IN_LEN,1,[Do we have sockaddr_in.sin_len?])],[],
221 #include <sys/types.h>
222 #include <sys/socket.h>
223 #include <netinet/in.h>
226 AC_CONFIG_HEADERS(config.h)
229 eibd/Makefile eibd/include/Makefile eibd/client/Makefile eibd/examples/Makefile eibd/libserver/Makefile eibd/server/Makefile eibd/backend/Makefile
230 eibd/client/def/Makefile eibd/client/c/Makefile eibd/client/java/Makefile eibd/client/php/Makefile eibd/client/cs/Makefile
231 eibd/eibnet/Makefile eibd/bcu/Makefile eibd/usb/Makefile
232 xml/Makefile xml/gui/Makefile xml/gui/examples/Makefile
233 bcu/Makefile bcu/lib/Makefile bcu/include/Makefile bcu/ldscripts/Makefile
234 bcugen/Makefile bcugen/struct/Makefile bcugen/configfile/Makefile bcugen/lib/Makefile
235 archive/Makefile build/Makefile