2 AC_INIT(PUAE, 2.8.1, rofl0r@github, puae)
4 AC_CONFIG_MACRO_DIR([m4])
5 AC_CONFIG_HEADER([src/sysconfig.h])
16 commit=`tail -1 .git/packed-refs | awk '{print $1}'`
17 if test -z "$commit"; then
20 AC_DEFINE_UNQUOTED(PACKAGE_COMMIT, "$commit", [cloned git commit version])
21 AC_SUBST(PACKAGE_COMMIT, $commit)
24 AS_HELP_STRING([--with-sound=alsa,none,sdl], [which sound backend to use [sdl]]),
29 AS_HELP_STRING([--with-gfx=x11,sdl], [which gfx backend to use [sdl]]),
34 AS_HELP_STRING([--with-gui=gtk,none,sdl], [which gui frontend to use [sdl]]),
39 AS_HELP_STRING([--with-threads=posix,none,sdl], [which threads implementation use [sdl]]),
44 AS_HELP_STRING([--with-os=linux,macosx,generic], [which OS to compile for [linux]]),
49 AS_HELP_STRING([--with-joystick=none,linuxold,sdl], [which joystick implementation to use [sdl]]),
54 AS_HELP_STRING([--with-machine=generic,amd64-gcc,x86-gcc,ppc-gcc], [which machine specific optimizations to use [generic]]),
59 AS_HELP_STRING([--with-float=ieee,unknown], [whether target machine uses IEEE 754 compatible floats [ieee]]),
64 AS_HELP_STRING([--enable-jit], [Enable JIT compiler (currently x86 only)]),
65 [WANT_JIT=$enableval],[])
68 AS_HELP_STRING([--enable-net], [Enable network functionality (requires pcap)]),
69 [WANT_NET=$enableval],[])
71 dnl Checks for header files.
75 AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h utime.h])
76 AC_CHECK_HEADERS([values.h ncurses.h curses.h sys/termios.h])
77 AC_CHECK_HEADERS([sys/stat.h sys/ipc.h sys/shm.h sys/mman.h])
78 AC_CHECK_HEADERS([sys/statfs.h sys/statvfs.h])
79 AC_CHECK_HEADERS([sys/filio.h])
81 AC_CHECK_HEADERS([libraries/cybergraphics.h cybergraphx/cybergraphics.h])
83 AC_CHECK_HEADERS([devices/ahi.h])
84 AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h sun/audioio.h sys/audioio.h])
86 AC_CHECK_HEADERS([machine/joystick.h])
87 AC_CHECK_HEADER([amigainput/amigainput.h], HAVE_AMIGAINPUT=yes, HAVE_AMIGAINPUT=no)
89 AC_CHECK_HEADERS([byteswap.h])
92 dnl Checks for typedefs, structures, and compiler characteristics.
106 AC_CHECK_SIZEOF(char, 1)
107 AC_CHECK_SIZEOF(short, 2)
108 AC_CHECK_SIZEOF(int, 4)
109 AC_CHECK_SIZEOF(long, 4)
110 AC_CHECK_SIZEOF(long long, 8)
111 AC_CHECK_SIZEOF(void *)
113 if test "${ac_cv_c_have_long_double}" = "yes" ; then
114 AC_CHECK_SIZEOF(long double, 12)
117 dnl Checks for library functions.
122 AC_CHECK_FUNCS(gettimeofday sigaction)
123 AC_CHECK_FUNCS(select strerror isnan isinf setitimer alarm sync)
124 AC_CHECK_FUNCS(readdir_r)
125 AC_CHECK_FUNCS(strdup strstr strcasecmp stricmp strcmpi)
126 AC_CHECK_FUNCS(nanosleep usleep sleep)
127 AC_CHECK_FUNCS(vprintf vsprintf vfprintf)
129 AC_CHECK_FUNCS(localtime_r timegm gmtime_r)
132 AC_MSG_CHECKING(for bswap_16)
135 # include <byteswap.h>
140 AC_DEFINE(HAVE_BSWAP_16, 1, [Define to 1 if you have the 'bswap_16' function.])
145 AC_MSG_CHECKING(for bswap_32)
148 # include <byteswap.h>
153 AC_DEFINE(HAVE_BSWAP_32, 1, [Define to 1 if you have the 'bswap_32' function.])
160 dnl Checks for fsusage
162 AC_CHECK_HEADERS(sys/param.h sys/vfs.h sys/fs_types.h)
163 AC_CHECK_HEADERS(sys/mount.h, [], [],
164 [#ifdef HAVE_SYS_PARAM_H
165 # include <sys/param.h>
168 jm_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no])
169 if test $gl_cv_fs_space = yes; then
171 gl_PREREQ_FSUSAGE_EXTRA
176 AC_CHECK_LIB(z, inflateEnd, [zlib_cv_libz=yes], [zlib_cv_libz=no])
177 AC_CHECK_HEADER(zlib.h, [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
178 if test "$zlib_cv_libz" = "yes" -a "$zlib_cv_zlib_h" = "yes"
180 UAE_LIBS="-lz $UAE_LIBS"
182 AC_MSG_ERROR(Check for libz failed)
188 AC_CHECK_LIB(dl, dlopen, [
189 UAE_LIBS="-ldl $UAE_LIBS"
190 AC_DEFINE(HAVE_DLOPEN, 1, "Define to 1 if you have 'dlopen' function)
195 if test x$WANT_NET = xyes ; then
196 AC_CHECK_LIB(pcap, pcap_open_live, [HAVE_LIB_PCAP=yes], [HAVE_LIB_PCAP=no])
197 AC_CHECK_HEADERS([pcap.h], HAVE_PCAP=yes, HAVE_PCAP=no)
198 if test x$HAVE_PCAP = xno || test x$HAVE_LIB_PCAP = xno ; then
199 AC_MSG_ERROR(pcap library not found!)
205 if test x$WANT_JIT = xyes ; then
206 AC_CHECK_HEADERS([execinfo.h])
210 AC_CONFIG_FILES([config.mak])
219 AC_SUBST(net_enabled)
220 AC_SUBST(jit_enabled)