2 dnl Copyright © 2008,2009 Keith Packard <keithp@keithp.com>
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 2 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful, but
10 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 dnl General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License along
15 dnl with this program; if not, write to the Free Software Foundation, Inc.,
16 dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
18 dnl Process this file with autoconf to create configure.
22 AC_CONFIG_SRCDIR([src/ao.h])
23 AM_INIT_AUTOMAKE([foreign dist-bzip2])
26 VERSION_DASH=`echo $VERSION | sed 's/\./-/g'`
27 AC_SUBST(VERSION_DASH)
29 dnl ==========================================================================
31 AM_CONFIG_HEADER(config.h)
33 AC_ARG_WITH(freetts, AS_HELP_STRING([--with-freetts=PATH],
34 [Set freetts class path (default /usr/share/java)]),
35 [FREETTS=$withval], [FREETTS=/usr/share/java])
39 AC_ARG_WITH(jfreechart, AS_HELP_STRING([--with-jfreechart=PATH],
40 [Set jfreechart class path (default /usr/share/java)]),
41 [JFREECHART=$withval], [JFREECHART=/usr/share/java])
45 AC_ARG_WITH(jcommon, AS_HELP_STRING([--with-jcommon=PATH],
46 [Set jcommon class path (default /usr/share/java)]),
47 [JCOMMON=$withval], [JCOMMON=/usr/share/java])
51 AC_ARG_WITH(jvm, AS_HELP_STRING([--with-jvm-include=PATH],
52 [Set jvm include path for jni builds (default searches in /usr/lib/jvm)]),
53 [JVM_INCLUDE=$withval], [JVM_INCLUDE=auto])
55 if test "x$JVM_INCLUDE" = "xauto"; then
56 AC_MSG_CHECKING([JVM include files])
57 for jvm in default-java java-6-openjdk java-6-sun; do
58 if test "x$JVM_INCLUDE" = "xauto"; then
59 INCLUDE="/usr/lib/jvm/$jvm/include"
60 if test -f "$INCLUDE"/jni.h; then
61 JVM_INCLUDE="$INCLUDE"
65 if test "x$JVM_INCLUDE" = "xauto"; then
66 AC_MSG_ERROR([no JVM include files found])
68 AC_MSG_RESULT([$JVM_INCLUDE])
73 AC_ARG_WITH(fat-dir, AS_HELP_STRING([--with-fat-dir=PATH],
74 [Set the directory to install the 'fat' distribution files to (defaults to not installing)]),
75 [FATDIR=$withval], [FATDIR=none])
77 AM_CONDITIONAL(FATINSTALL, [test "x$FATDIR" != "xnone"])
89 if test "x$GCC" = "xyes"; then
90 WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
91 -Wmissing-prototypes -Wmissing-declarations \
92 -Wnested-externs -fno-strict-aliasing"
93 AC_DEFINE_UNQUOTED(HAVE_WARNING_CPP_DIRECTIVE,1,
94 [Can use #warning in C files])
98 AC_CHECK_HEADERS(flite/flite.h,HAVE_FLITE_H=yes,HAVE_FLITE_H=no)
99 AC_CHECK_LIB(flite, flite_init,HAVE_LIBFLITE=yes,HAVE_LIBFLITE=no,-lasound -lm)
101 if test "x$HAVE_FLITE_H" = "xyes" -a "x$HAVE_LIBFLITE" = "xyes"; then
102 AC_DEFINE(HAVE_FLITE,1,[Define if the flite library is usable])
103 AC_SUBST(FLITE_LIBS,"-lflite_cmu_us_kal16 -lflite_usenglish -lflite_cmulex -lflite -lasound -lm")
104 AC_SUBST(FLITE_INCS,-Iflite)
106 LIBS="$LIBS $FLITE_LIBS"
107 AC_CHECK_FUNCS([register_cmu_us_kal16 register_cmu_us_kal],break)
110 AM_CONDITIONAL(USE_FLITE,test "x$HAVE_FLITE_H" = "xyes" -a "x$HAVE_LIBFLITE" = "xyes")
112 AC_CHECK_PROG([HAVE_SDCC], [sdcc], yes, no)
113 if test "x$HAVE_SDCC" = "xno"; then
114 AC_MSG_ERROR([Please install sdcc to build AltOs])
117 AC_CHECK_PROG([HAVE_NICKLE], [nickle], yes, no)
118 if test "x$HAVE_NICKLE" = "xno"; then
119 AC_MSG_ERROR([Please install nickle to build AltOs])
122 AC_CHECK_LIB(readline, readline)
124 PKG_CHECK_MODULES([GNOME], [gtk+-2.0 libglade-2.0 gconf-2.0])
126 PKG_CHECK_MODULES([LIBUSB], [libusb-1.0])
128 PKG_CHECK_MODULES([ALSA], [alsa])
130 PKG_CHECK_MODULES([PLPLOT], [plplotd])
132 PKG_CHECK_MODULES([SNDFILE], [sndfile])
137 altosui/libaltos/Makefile
139 ao-tools/lib/Makefile
140 ao-tools/ao-rawload/Makefile
141 ao-tools/ao-dbg/Makefile
142 ao-tools/ao-dumplog/Makefile
143 ao-tools/ao-bitbang/Makefile
144 ao-tools/ao-eeprom/Makefile
145 ao-tools/ao-list/Makefile
146 ao-tools/ao-load/Makefile
147 ao-tools/ao-postflight/Makefile
148 ao-tools/ao-view/Makefile