3 AC_INIT(bcusdk, 0.0.2.1)
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 AC_CHECK_FUNCS(gethostbyname_r,,[AC_MSG_WARN([eibd client library not thread safe])])
27 AM_CONDITIONAL(LINUX_API, test x$have_linux_api = xyes)
29 AC_ARG_ENABLE(onlyeibd,
30 [ --enable-onlyeibd build only eibd (requires no libxml and m68hc05-gnu)],
31 [case "${enableval}" in
34 *) AC_MSG_ERROR(bad value ${enableval} for --enable-onlyeibd) ;;
35 esac],[onlyeibd=false])
36 AM_CONDITIONAL(HAVE_ONLYEIBD, test x$onlyeibd = xtrue)
38 if test x$onlyeibd = xfalse ; then
40 AM_PATH_XML2(2.6.16,,[AC_MSG_ERROR([limxml2 not found])])
41 AC_PATH_PROG(TAS,[m68hc05-as],,[$PATH:$bindir:$prefix/bin])
42 AC_PATH_PROG(TLD,[m68hc05-ld],,[$PATH:$bindir:$prefix/bin])
43 AC_PATH_PROG(TAR,[m68hc05-ar],,[$PATH:$bindir:$prefix/bin])
44 AC_PATH_PROG(TRANLIB,[m68hc05-ranlib],,[$PATH:$bindir:$prefix/bin])
45 AC_PATH_PROG(TGCC,[m68hc05-gcc],,[$PATH:$bindir:$prefix/bin])
47 test -z "$TAS" && AC_MSG_ERROR([m68hc05-as not found])
48 test -z "$TAR" && AC_MSG_ERROR([m68hc05-ar not found])
49 test -z "$TLD" && AC_MSG_ERROR([m68hc05-ld not found])
50 test -z "$TRANLIB" && AC_MSG_ERROR([m68hc05 ranlib not found])
51 test -z "$TGCC" && AC_MSG_ERROR([m68hc05 gcc not found])
56 [ --enable-ft12 enable FT1.2 backend],
57 [case "${enableval}" in
60 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ft12) ;;
62 AM_CONDITIONAL(HAVE_FT12, test x$ft12 = xtrue)
63 if test x$ft12 = xtrue ; then
64 AC_DEFINE(HAVE_FT12, 1 , [FT1.2 enabled])
68 [ --enable-pei16 enable BCU1 kernel driver backend],
69 [case "${enableval}" in
72 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pei16) ;;
74 AM_CONDITIONAL(HAVE_PEI16, test x$pei16 = xtrue)
75 if test x$pei16 = xtrue; then
76 AC_DEFINE(HAVE_PEI16, 1 , [PEI16 enabled])
80 [ --enable-tpuart enable TPUART kernel driver backend],
81 [case "${enableval}" in
84 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tpuart) ;;
86 AM_CONDITIONAL(HAVE_TPUART, test x$tpuart = xtrue)
87 if test x$tpuart = xtrue ; then
88 AC_DEFINE(HAVE_TPUART, 1 , [TPUART enabled])
92 [ --enable-pei16s enable BCU1 user driver backend (very experimental)],
93 [case "${enableval}" in
96 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pei16s) ;;
98 AM_CONDITIONAL(HAVE_PEI16s, test x$pei16s = xtrue)
99 if test x$pei16s = xtrue ; then
100 AC_DEFINE(HAVE_PEI16s, 1 , [PEI16s enabled])
103 AC_ARG_ENABLE(tpuarts,
104 [ --enable-tpuarts enable TPUART user driver backend (experimental)],
105 [case "${enableval}" in
108 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tpuarts) ;;
109 esac],[tpuarts=false])
110 AM_CONDITIONAL(HAVE_TPUARTs, test x$tpuarts = xtrue)
111 if test x$tpuarts = xtrue ; then
112 AC_DEFINE(HAVE_TPUARTs, 1 , [TPUARTs enabled])
115 AC_ARG_ENABLE(eibnetip,
116 [ --enable-eibnetip enable EIBnet/IP routing backend],
117 [case "${enableval}" in
118 yes) eibnetip=true ;;
119 no) eibnetip=false ;;
120 *) AC_MSG_ERROR(bad value ${enableval} for --enable-eibnetip) ;;
121 esac],[eibnetip=false])
122 AM_CONDITIONAL(HAVE_EIBNETIP, test x$eibnetip = xtrue)
123 if test x$eibnetip = xtrue ; then
124 AC_DEFINE(HAVE_EIBNETIP, 1 , [EIBnet/IP enabled])
127 AC_ARG_ENABLE(eibnetiptunnel,
128 [ --enable-eibnetiptunnel enable EIBnet/IP tunneling backend],
129 [case "${enableval}" in
130 yes) eibnetiptunnel=true ;;
131 no) eibnetiptunnel=false ;;
132 *) AC_MSG_ERROR(bad value ${enableval} for --enable-eibnetiptunnel) ;;
133 esac],[eibnetiptunnel=false])
134 AM_CONDITIONAL(HAVE_EIBNETIPTUNNEL, test x$eibnetiptunnel = xtrue)
135 if test x$eibnetiptunnel = xtrue ; then
136 if test x$have_source_info != xyes ; then
137 AC_MSG_ERROR(not all needed functions for EIBnet/IP tunneling backend available)
139 AC_DEFINE(HAVE_EIBNETIPTUNNEL, 1 , [EIBnet/IP tunneling enabled])
143 [ --enable-usb enable USB backend],
144 [case "${enableval}" in
147 *) AC_MSG_ERROR(bad value ${enableval} for --enable-usb) ;;
149 AM_CONDITIONAL(HAVE_USB, test x$usb = xtrue)
150 if test x$usb = xtrue ; then
151 if test x$have_usb != xyes ; then
152 AC_MSG_ERROR(not all needed functions for USB backend available)
154 AC_DEFINE(HAVE_USB, 1 , [USB backend enabled])
157 AC_ARG_ENABLE(eibnetipserver,
158 [ --enable-eibnetipserver enable EIBnet/IP server frontend],
159 [case "${enableval}" in
160 yes) eibnetipserver=true ;;
161 no) eibnetipserver=false ;;
162 *) AC_MSG_ERROR(bad value ${enableval} for --enable-eibnetipserver) ;;
163 esac],[eibnetipserver=false])
164 if test x$eibnetipserver = xtrue ; then
165 if test x$have_source_info != xyes ; then
166 AC_MSG_ERROR(not all needed functions for EIBnet/IP server available)
168 AC_DEFINE(HAVE_EIBNETIPSERVER, 1 , [EIBnet/IP server enabled])
171 AC_ARG_ENABLE(groupcache,
172 [ --enable-groupcache enable Group Cache (default: yes)],
173 [case "${enableval}" in
174 yes) groupcache=true ;;
175 no) groupcache=false ;;
176 *) AC_MSG_ERROR(bad value ${enableval} for --enable-groupcache) ;;
177 esac],[groupcache=true])
178 if test x$groupcache = xtrue ; then
179 AC_DEFINE(HAVE_GROUPCACHE, 1 , [Group Cache enabled])
183 AM_CONDITIONAL(HAVE_SOURCE_INFO, test x$have_source_info = xyes )
185 AC_CHECK_PROGS(INDENT, indent, no)
186 AC_CHECK_PROGS(JAR, fastjar jar, no)
187 AC_CHECK_PROGS(JAVAC, "gcj -C" javac, no)
190 [ --enable-java build java client library],
191 [case "${enableval}" in
192 yes) enablejava=true ;;
193 no) enablejava=false ;;
194 *) AC_MSG_ERROR(bad value ${enableval} for --enable-java) ;;
195 esac],[enablejava=false])
196 if test x$enablejava = xtrue ; then
197 AC_DEFINE(BUILD_JAVA, 1 , [building java client library])
199 if test x"$JAVAC" = xno ; then
200 AC_MSG_ERROR(no java compiler found)
203 if test x"$JAR" = xno ; then
204 AC_MSG_ERROR(jar not found)
209 AM_CONDITIONAL(BUILD_JAVA, test x$enablejava = xtrue )
211 AC_CONFIG_HEADERS(config.h)
214 eibd/Makefile eibd/include/Makefile eibd/client/Makefile eibd/examples/Makefile eibd/libserver/Makefile eibd/server/Makefile eibd/backend/Makefile
215 eibd/client/def/Makefile eibd/client/c/Makefile eibd/client/java/Makefile eibd/client/php/Makefile
216 eibd/eibnet/Makefile eibd/bcu/Makefile eibd/usb/Makefile
217 xml/Makefile xml/gui/Makefile xml/gui/examples/Makefile
218 bcu/Makefile bcu/lib/Makefile bcu/include/Makefile bcu/ldscripts/Makefile
219 bcugen/Makefile bcugen/struct/Makefile bcugen/configfile/Makefile bcugen/lib/Makefile
220 archive/Makefile build/Makefile