|
|
1.1 root 1: dnl Process this file with autoconf to produce a configure script.
2:
1.1.1.4 ! root 3: dnl $Id: configure.in,v 1.17 2007/08/26 13:57:12 fredette Exp $
1.1 root 4:
5: dnl Copyright (c) 2001, 2003 Matt Fredette
6: dnl All rights reserved.
7: dnl
8: dnl Redistribution and use in source and binary forms, with or without
9: dnl modification, are permitted provided that the following conditions
10: dnl are met:
11: dnl 1. Redistributions of source code must retain the above copyright
12: dnl notice, this list of conditions and the following disclaimer.
13: dnl 2. Redistributions in binary form must reproduce the above copyright
14: dnl notice, this list of conditions and the following disclaimer in the
15: dnl documentation and/or other materials provided with the distribution.
16: dnl 3. All advertising materials mentioning features or use of this software
17: dnl must display the following acknowledgement:
18: dnl This product includes software developed by Matt Fredette.
19: dnl 4. The name of the author may not be used to endorse or promote products
20: dnl derived from this software without specific prior written permission.
21: dnl
22: dnl THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23: dnl IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24: dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25: dnl DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
26: dnl INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27: dnl (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28: dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29: dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30: dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31: dnl ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32: dnl POSSIBILITY OF SUCH DAMAGE.
33:
34: dnl Checks that we are given a good source directory.
35: AC_INIT(ic/m68k/m68k-impl.h)
36: AC_CANONICAL_SYSTEM
1.1.1.4 ! root 37: AM_INIT_AUTOMAKE(tme, 0.6)
1.1 root 38:
39: dnl Write configuration out to config.h through config.h.in.
40: AM_CONFIG_HEADER(config.h)
41:
42: dnl Checks for programs.
43: AC_PROG_CC
44: AC_PROG_CPP
45: AC_PROG_YACC
46: AC_PROG_INSTALL
47: AC_PROG_MAKE_SET
48:
49: dnl Checks for header files.
50: AC_HEADER_STDC
1.1.1.3 root 51: AC_CHECK_HEADERS(unistd.h stdio.h memory.h stdarg.h limits.h float.h)
1.1 root 52: AC_CHECK_HEADERS(sys/ioctl.h sys/sockio.h sys/socketio.h net/if_dl.h ioctls.h)
1.1.1.3 root 53: AC_CHECK_HEADERS(sys/bswap.h)
1.1 root 54:
55: dnl Checks for typedefs, structures, and compiler characteristics.
56: AC_C_BIGENDIAN
57: AC_C_CONST
58: AC_C_INLINE
1.1.1.3 root 59: AC_C_VOLATILE
60: AC_C_LONG_DOUBLE
1.1.1.2 root 61: AC_TYPE_SIZE_T
1.1.1.3 root 62: AC_TYPE_SIGNAL
1.1 root 63: AC_CHECK_SIZEOF(long, 4)
64: AC_CHECK_SIZEOF(int, 4)
65: AC_CHECK_SIZEOF(short, 2)
1.1.1.3 root 66: AC_CHECK_SIZEOF(float, 4)
67: AC_CHECK_SIZEOF(double, 8)
68: if test $ac_cv_c_long_double = yes; then
69: AC_CHECK_SIZEOF(long double, 12)
70: fi
1.1 root 71: if test $ac_cv_sizeof_int != 4 && test $ac_cv_sizeof_long != 4; then
72: AC_MSG_ERROR([can't find a 32-bit type])
73: fi
74: if test $ac_cv_sizeof_int != 2 && test $ac_cv_sizeof_short != 2; then
75: AC_MSG_ERROR([can't find a 16-bit type])
76: fi
1.1.1.4 ! root 77: if test $ac_cv_sizeof_long = 8; then
! 78: AC_CHECK_ALIGNOF(64)
! 79: fi
1.1 root 80: AC_CHECK_ALIGNOF(32)
81: AC_CHECK_ALIGNOF(16)
82: AC_CHECK_SHIFTMAX(8)
83: AC_CHECK_SHIFTMAX(16)
84: AC_CHECK_SHIFTMAX(32)
1.1.1.3 root 85: AC_CHECK_SHIFTSIGNED(8)
86: AC_CHECK_SHIFTSIGNED(16)
87: AC_CHECK_SHIFTSIGNED(32)
88: AC_CHECK_FLOAT_FORMAT(float)
89: AC_CHECK_FLOAT_LIMITS(float, FLT_MAX/FLT_MIN)
90: AC_CHECK_FLOAT_FORMAT(double)
91: AC_CHECK_FLOAT_LIMITS(double, DBL_MAX/DBL_MIN)
92: if test $ac_cv_c_long_double = yes; then
93: AC_CHECK_FLOAT_FORMAT(long double)
94: AC_CHECK_FLOAT_LIMITS(long double, LDBL_MAX/LDBL_MIN)
95: fi
1.1 root 96: AC_SYS_SOCKADDR_SA_LEN
97:
98: dnl Checks for library functions and prototypes.
99: AC_PROG_GCC_TRADITIONAL
100: AC_FUNC_MEMCMP
101: AC_FUNC_MMAP
1.1.1.3 root 102: AC_CHECK_FUNC_LONG(bswap16, [
103: unsigned int x;
104:
105: x = bswap16(0x1122);
106: ], [
107: #ifdef HAVE_SYS_BSWAP_H
108: #include <sys/bswap.h>
109: #endif
110: ])
111: AC_CHECK_FUNC_LONG(bswap32, [
112: unsigned int x;
113:
114: x = bswap32(0x11223344);
115: ], [
116: #ifdef HAVE_SYS_BSWAP_H
117: #include <sys/bswap.h>
118: #endif
119: ])
120: AC_CHECK_FUNC_LONG(isinff,
121: [
122: float x;
123: int y;
124:
125: x = 1;
126: y = isinff(x);
127: ], [
128: #include <math.h>
129: ], -lm)
1.1 root 130:
131: dnl Checks for perl.
132: AC_PATH_PROGS(PERL, perl4.036 perl4 perl perl5, no)
133: AC_SUBST(PERL)
134:
1.1.1.2 root 135: dnl Start the list of host support.
136: TME_HOSTS="posix"
137:
1.1 root 138: dnl Checks for AF_LINK.
139: AC_MSG_CHECKING([for AF_LINK support])
140: AC_EGREP_CPP(_tme_has_af_link,
141: [
142: #include <sys/socket.h>
143: #ifdef AF_LINK
144: _tme_has_af_link
145: #endif
146: ], [
147: AC_MSG_RESULT(yes)
148: AC_DEFINE(HAVE_AF_LINK, [], [Define if you have AF_LINK.])
149: ], [
150: AC_MSG_RESULT(no)
151: ])
152:
153: dnl Checks for BPF.
154: tme_raw_type=
1.1.1.2 root 155: AC_CHECK_HEADER(net/bpf.h,
156: [AC_EGREP_CPP(found_BIOCSHDRCMPLT,
157: [#include <net/bpf.h>
158: #ifdef BIOCSHDRCMPLT
159: found_BIOCSHDRCMPLT
160: #endif
161: ], [tme_raw_type=bpf])])
1.1 root 162: AC_MSG_CHECKING([for raw Ethernet access method])
1.1.1.2 root 163: case "x$tme_raw_type" in
164: xbpf) TME_HOSTS="${TME_HOSTS} bsd" ;;
165: x) tme_raw_type=none ;;
166: esac
1.1 root 167: AC_MSG_RESULT($tme_raw_type)
168:
1.1.1.2 root 169: dnl Checks for X11.
170: AC_PATH_XTRA
171:
172: dnl Checks for GTK.
173: AM_PATH_GTK([], have_gtk=true, have_gtk=false)
174: if $have_gtk; then
175: AC_DEFINE(HAVE_GTK, [], [Define if you are compiling with GTK.])
176: TME_HOSTS="${TME_HOSTS} gtk"
177: fi
178:
179: dnl Characterize any graphics displays and remember the areas of
180: dnl the smallest and largest screens.
181: TME_FB_XLAT_DST=
182: area_smallest=0
183: area_largest=0
184:
1.1.1.3 root 185: # if --with-tme-host-displays is given, characterize those given displays:
186: AC_ARG_WITH(tme-host-displays,
187: [ --with-tme-host-displays=DISPLAYS support host displays with these display formats])
188: for dst_key in ${with_tme_host_displays}; do
1.1.1.2 root 189:
190: dnl Make brackets safe to use.
191: changequote(<<, >>)dnl
192:
193: this_width=`echo ${dst_key} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\1/'`
194: this_height=`echo ${dst_key} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\2/'`
195: dst_key=`echo ${dst_key} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\3/'`
196: this_area=`expr ${this_width} \* ${this_height}`
197:
198: if test ${area_smallest} = 0 || test `expr ${this_area} \< ${area_smallest}` = 1; then
199: area_smallest=${this_area}
200: fi
201: if test `expr ${this_area} \> ${area_largest}` = 1; then
202: area_largest=${this_area}
203: fi
204:
205: # add in this destination display key:
206: if echo " ${TME_FB_XLAT_DST} " | grep " ${dst_key} " > /dev/null 2>&1; then :; else
207: TME_FB_XLAT_DST="${TME_FB_XLAT_DST} ${dst_key}"
208: fi
209:
210: dnl Make brackets the quote characters again.
211: changequote([, ])dnl
212: done
213:
214: # if DISPLAY is set and xdpyinfo appears to work, characterize this X display:
215: if test "x${DISPLAY}" != x && xdpyinfo >/dev/null 2>&1; then
216: AC_MSG_CHECKING(characteristics of X display ${DISPLAY})
217:
218: dnl Make brackets safe to use.
219: changequote(<<, >>)dnl
220:
221: # get the format this display uses for bitmaps:
222: bitmap_info=`xdpyinfo | grep 'bitmap unit' | sed -e 's/bitmap unit, *bit order, *padding: *\(.*\)$/\1/'`
223: bitmap_order=`echo ${bitmap_info} | sed -e 's/\([0-9][0-9]*\), *\([LM]\)SBFirst, *\([0-9][0-9]*\).*/\2/'`
224: bitmap_pad=`echo ${bitmap_info} | sed -e 's/\([0-9][0-9]*\), *\([LM]\)SBFirst, *\([0-9][0-9]*\).*/\3/'`
225: bitmap_order=`echo ${bitmap_order} | tr A-Z a-z`
226:
1.1.1.3 root 227: # get the format this display uses for images at its default depth. we
228: # assume that the root window is at the default depth:
1.1.1.2 root 229: pixmap_order=`xdpyinfo | grep 'image byte order'`
230: pixmap_order=`echo ${pixmap_order} | sed -e 's/.*image byte order: *\([LM]\)SBFirst.*/\1/' | tr A-Z a-z`
1.1.1.3 root 231: pixmap_depth=`xwininfo -root | grep 'Depth:'`
232: pixmap_depth=`echo ${pixmap_depth} | sed -e 's/.*Depth: *\([0-9][0-9]*\).*/\1/'`
1.1.1.2 root 233: pixmap_infos=`xdpyinfo | grep bits_per_pixel | tr '\n' %`
234: save_IFS=$IFS
235: IFS=%
236: for pixmap_info in $pixmap_infos; do
237: IFS=$save_IFS
238: if test "x$pixmap_info" = x; then continue; fi
239: this_pixmap_depth=`echo ${pixmap_info} | sed -e 's/.*depth \([0-9][0-9]*\), *bits_per_pixel \([0-9][0-9]*\), *scanline_pad \([0-9][0-9]*\).*/\1/'`
240: this_pixmap_bipp=`echo ${pixmap_info} | sed -e 's/.*depth \([0-9][0-9]*\), *bits_per_pixel \([0-9][0-9]*\), *scanline_pad \([0-9][0-9]*\).*/\2/'`
241: this_pixmap_pad=`echo ${pixmap_info} | sed -e 's/.*depth \([0-9][0-9]*\), *bits_per_pixel \([0-9][0-9]*\), *scanline_pad \([0-9][0-9]*\).*/\3/'`
1.1.1.3 root 242: if test "x${this_pixmap_depth}" = "x${pixmap_depth}"; then
1.1.1.2 root 243: pixmap_bipp=${this_pixmap_bipp}
244: pixmap_pad=${this_pixmap_pad}
1.1.1.3 root 245: break
1.1.1.2 root 246: fi
247: done
248: IFS=$save_IFS
249:
250: # if this display's greatest depth is one, we use its
251: # bitmap format:
1.1.1.3 root 252: if test "x${pixmap_bipp}" = x; then
1.1.1.2 root 253: pixmap_bipp=1
254: pixmap_pad=${bitmap_pad}
255:
256: # our translation functions can't handle the case when the bitmap
257: # bit order is different from the image byte order - doing so
258: # requires dealing with the bitmap unit size. since this
259: # situation is rare, just bail:
260: if test ${bitmap_order} != ${pixmap_order}; then
261: changequote([, ])dnl
262: AC_MSG_WARN([the X display ${DISPLAY} is monochrome and needs bitmaps with a bit order that the generic code doesn't support])
263: changequote(<<, >>)dnl
1.1.1.3 root 264: pixmap_bipp=
1.1.1.2 root 265: fi
266: fi
267:
268: # if this display seems usable:
1.1.1.3 root 269: if test "x${pixmap_bipp}" != x; then
1.1.1.2 root 270:
271: # check the dimensions of all screens on this display:
272: dimensions=`xdpyinfo | grep dimensions | tr '\n' %`
273: save_IFS=$IFS
274: IFS=%
275: for dimension in $dimensions; do
276: IFS=$save_IFS
277: if test "x$dimension" = x; then continue; fi
278: this_width=`echo ${dimension} | sed -e 's/.*dimensions: *\([0-9][0-9]*\)x\([0-9][0-9]*\).*/\1/'`
279: this_height=`echo ${dimension} | sed -e 's/.*dimensions: *\([0-9][0-9]*\)x\([0-9][0-9]*\).*/\2/'`
280: this_area=`expr ${this_width} \* ${this_height}`
281: if test ${area_smallest} = 0 || test `expr ${this_area} \< ${area_smallest}` = 1; then
282: area_smallest=${this_area}
283: fi
284: if test `expr ${this_area} \> ${area_largest}` = 1; then
285: area_largest=${this_area}
286: fi
287: done
288: IFS=$save_IFS
289:
1.1.1.3 root 290: # assume an unknown set of masks and an unknown mapping type:
291: dst_masks=_r0x0_g0x0_b0x0
292: dst_map=
293: value_visual=", unknown visual"
294:
295: # if the depth is greater than one:
296: if test "x${pixmap_depth}" != 1; then
297:
298: # we assume that the root window uses the default visual:
299: visual=`xwininfo -root | grep 'Visual Class:' | sed -e 's/^ *Visual Class: *\([A-Za-z][A-Za-z]*\).*$/\1/'`
300:
301: # get any primary masks for this visual:
302: case "x${visual}" in
303: xDirectColor | xTrueColor)
304: dst_masks=`xdpyinfo | $EGREP '(visual id|class|blue masks):' | $EGREP -C1 $visual | grep 'blue masks' | head -1`
305: dst_masks=`echo ${dst_masks} | sed -e 's/^.*blue masks: *\(.*\)/\1/'`
306: value_visual=", rgb masks ${dst_masks}"
307: dst_masks=`echo ${dst_masks} | sed -e 's/^/_r/' -e 's/, /_g/' -e 's/, /_b/'`
308: ;;
309: xStaticGray | xGrayScale | xStaticColor | xPseudoColor)
310: dst_masks=
311: value_visual=", no subfields"
312: ;;
313: *) ;;
314: esac
315:
316: # get the mapping type for this visual:
317: case "x${visual}" in
318: xStaticGray | xStaticColor | xPseudoColor)
319: dst_map="ml"
320: ;;
321: xDirectColor)
322: dst_map="mi"
323: value_visual="${value_visual}, indexed"
324: ;;
325: xGrayScale | xTrueColor)
326: dst_map="ml"
327: value_visual="${value_visual}, linear"
328: ;;
329: *) ;;
330: esac
331: fi
332:
1.1.1.2 root 333: dnl Make brackets the quote characters again.
334: changequote([, ])dnl
335:
336: # finish the characterization:
1.1.1.3 root 337: if test "x${pixmap_bipp}" = "x${pixmap_depth}"; then
1.1.1.2 root 338: value=
339: else
340: value=" (${pixmap_bipp} bits per pixel)"
341: fi
1.1.1.3 root 342: AC_MSG_RESULT([${pixmap_depth}-bit${value} ${pixmap_order}sb-first images with ${pixmap_pad}-bit padding${value_visual}])
343: dst_key="d${pixmap_depth}b${pixmap_bipp}s0p${pixmap_pad}o${pixmap_order}${dst_map}${dst_masks}"
1.1.1.2 root 344:
345: # add in this destination display key:
346: if echo " ${TME_FB_XLAT_DST} " | grep " ${dst_key} " > /dev/null 2>&1; then :; else
347: TME_FB_XLAT_DST="${TME_FB_XLAT_DST} ${dst_key}"
348: fi
349: fi
350: fi
351: AC_SUBST(TME_FB_XLAT_DST)
352:
1.1 root 353: dnl Configures for the system(s) to emulate.
354: systems=all
355: if echo " ${systems} " | grep ' all ' > /dev/null 2>&1; then
1.1.1.4 ! root 356: systems="sun2 sun3 sun4"
1.1 root 357: fi
358: TME_MACHINE_SUBDIRS=
359: TME_IC_SUBDIRS=
360: TME_ICS=
1.1.1.2 root 361: TME_SERIAL_SUBDIRS=
362: TME_SERIALS=
1.1 root 363: TME_BUS_SUBDIRS=
1.1.1.2 root 364: TME_FB_XLAT_SRC=
1.1 root 365: for system in $systems; do
366:
367: # dispatch on the machine type to get more machines, ICs, and
368: # buses to compile:
369: case ${system} in
370:
371: # the sun2:
372: sun2)
373: machines="sun sun2"
1.1.1.3 root 374: ics="m68k am9513 mm58167 z8530 i825x6"
1.1 root 375: buses="multibus"
1.1.1.2 root 376: fb_xlats="1152x900d1b1s0p32om"
1.1 root 377: ;;
378:
1.1.1.3 root 379: # the sun3:
380: sun3)
381: machines="sun sun3"
382: ics="m68k isil7170 z8530 i825x6 ieee754 ncr5380"
383: buses="multibus"
384: fb_xlats="1152x900d1b1s0p32om 1152x900d8b8s0p32ommi8 1152x900d1b1s0p32omccmi8"
385: ;;
386:
1.1.1.4 ! root 387: # the sun4:
! 388: sun4)
! 389: machines="sun sun4"
! 390: ics="sparc isil7170 z8530 am7930 am7990 ieee754 ncr53c9x mk48txx lsi64854 nec765"
! 391: buses="sbus"
! 392: fb_xlats="1152x900d1b1s0p32om 1152x900d8b8s0p32ommi8 1152x900d1b1s0p32omccmi8"
! 393: ;;
! 394:
1.1 root 395: *)
396: AC_MSG_ERROR([don't know how to emulate ${machine}])
397: ;;
398: esac
399:
1.1.1.2 root 400: # add in the new machines, ICs, serials, and buses to compile:
1.1 root 401: for machine in $machines; do
402: if echo " ${TME_MACHINE_SUBDIRS} " | grep " ${machine} " > /dev/null 2>&1; then :; else
403: TME_MACHINE_SUBDIRS="${TME_MACHINE_SUBDIRS} ${machine}"
404: fi
405: done
406: for ic in $ics; do
407: if test -d ic/$ic; then
408: if echo " ${TME_IC_SUBDIRS} " | grep " ${ic} " > /dev/null 2>&1; then :; else
409: TME_IC_SUBDIRS="${TME_IC_SUBDIRS} ${ic}"
410: fi
411: else
412: ic="tme_ic_${ic}.la"
413: if echo " ${TME_ICS} " | grep " ${ic} " > /dev/null 2>&1; then :; else
414: TME_ICS="${TME_ICS} ${ic}"
415: fi
416: fi
417: done
1.1.1.2 root 418: for serial in $serials; do
419: if test -d serial/$serial; then
420: if echo " ${TME_SERIAL_SUBDIRS} " | grep " ${serial} " > /dev/null 2>&1; then :; else
421: TME_SERIAL_SUBDIRS="${TME_SERIAL_SUBDIRS} ${serial}"
422: fi
423: else
424: serial="tme_serial_${serial}.la"
425: if echo " ${TME_SERIALS} " | grep " ${serial} " > /dev/null 2>&1; then :; else
426: TME_SERIALS="${TME_SERIALS} ${serial}"
427: fi
428: fi
429: done
1.1 root 430: for bus in $buses; do
431: if echo " ${TME_BUS_SUBDIRS} " | grep " ${bus} " > /dev/null 2>&1; then :; else
432: TME_BUS_SUBDIRS="${TME_BUS_SUBDIRS} ${bus}"
433: fi
434: done
1.1.1.2 root 435:
436: # add in the new frame buffer translations to compile:
437: for fb_xlat in $fb_xlats; do
438: if echo " ${TME_FB_XLAT_SRC} " | grep " ${fb_xlat} " > /dev/null 2>&1; then :; else
439: TME_FB_XLAT_SRC="${TME_FB_XLAT_SRC} ${fb_xlat}"
440: fi
441:
442: dnl Make brackets safe to use.
443: changequote(<<, >>)dnl
444:
445: # calculate the area of this frame buffer multiplied by 100:
446: this_width=`echo ${fb_xlat} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\1/'`
447: this_height=`echo ${fb_xlat} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\2/'`
448: this_area=`expr ${this_width} \* ${this_height} \* 100`
449:
450: dnl Make brackets the quote characters again.
451: changequote([, ])dnl
452:
453: # if this frame buffer would consume at least 70 percent of
454: # the smallest destination screen, make an xlat function that
455: # scales this frame buffer down by two:
456: if test ${area_smallest} = 0; then
457: percentage=100
458: else
459: percentage=`expr ${this_area} / ${area_smallest}`
460: fi
461: if test `expr ${percentage} \> 70` = 1; then
462: src_key="${fb_xlat}_h"
463: if echo " ${TME_FB_XLAT_SRC} " | grep " ${src_key} " > /dev/null 2>&1; then :; else
464: TME_FB_XLAT_SRC="${TME_FB_XLAT_SRC} ${src_key}"
465: fi
466: fi
467:
468: # if this frame buffer would consume less than 30 percent of
469: # the largest destination screen, make an xlat function that
470: # scales this frame buffer up by two:
471: if test ${area_largest} = 0; then
472: percentage=0
473: else
474: percentage=`expr ${this_area} / ${area_largest}`
475: fi
476: if test `expr ${percentage} \< 30` = 1; then
477: src_key="${fb_xlat}_d"
478: if echo " ${TME_FB_XLAT_SRC} " | grep " ${src_key} " > /dev/null 2>&1; then :; else
479: TME_FB_XLAT_SRC="${TME_FB_XLAT_SRC} ${src_key}"
480: fi
481: fi
482: done
1.1 root 483: done
484: AC_SUBST(TME_MACHINE_SUBDIRS)
485: AC_SUBST(TME_IC_SUBDIRS)
486: AC_SUBST(TME_ICS)
1.1.1.2 root 487: AC_SUBST(TME_SERIAL_SUBDIRS)
488: AC_SUBST(TME_SERIALS)
1.1 root 489: AC_SUBST(TME_BUS_SUBDIRS)
1.1.1.2 root 490: AC_SUBST(TME_FB_XLAT_SRC)
491:
492: dnl The list of host support is finished.
1.1 root 493: AC_SUBST(TME_HOSTS)
494:
495: dnl Configure for libtool.
496: AC_LIBLTDL_INSTALLABLE
497: AC_SUBST(INCLTDL)
498: AC_SUBST(LIBLTDL)
499: AC_LIBTOOL_DLOPEN
500: AM_PROG_LIBTOOL
501: AC_SUBST(LTLIBOBJS)
502: AC_CONFIG_SUBDIRS(libltdl)
503: TME_PREOPEN=
504: if test $enable_shared = no; then
505: TME_PREOPEN='`sort -u $(top_builddir)/tme-preopen.txt`'
506: fi
507: AC_SUBST(TME_PREOPEN)
508:
509: dnl Configure debugging and/or warnings.
510: AC_ARG_ENABLE(debug,
1.1.1.4 ! root 511: [ --enable-debug compile debuggable libraries and programs (default=don't)],
1.1.1.3 root 512: [ ], [enable_debug=no])
1.1 root 513: if test "x$enable_debug" = "xyes"; then
514: CFLAGS="${CFLAGS-} -g -O0"
515: CXXFLAGS="${CXXFLAGS-} -g3 -O0"
1.1.1.3 root 516: else
517: CPPFLAGS="${CPPFLAGS-} -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG"
1.1 root 518: fi
519: AC_ARG_ENABLE(warnings,
520: [ --disable-warnings don't compile with warnings turned on (default=do)],
521: [ ], [enable_warnings=yes])
522: if test "x$enable_warnings" = "xyes" -a "x$GCC" = "xyes"; then
1.1.1.3 root 523: CFLAGS="${CFLAGS-} -Wundef -Wall -Werror"
1.1 root 524: CXXFLAGS="${CXXFLAGS-} -W"
525: fi
526:
1.1.1.3 root 527: dnl Some code isn't alias-clean.
528: CFLAGS_NO_STRICT_ALIASING=
529: if test "x$GCC" = "xyes"; then
530: CFLAGS_NO_STRICT_ALIASING=" -fno-strict-aliasing"
531: fi
532: AC_SUBST(CFLAGS_NO_STRICT_ALIASING)
533:
1.1 root 534: dnl Generate tmeconfig.h. The whether-to-generate logic is cribbed
535: dnl from glib-1.2.1's configure.in.
536: dnl See that file for an explanation.
537: AC_OUTPUT_COMMANDS([
538:
539: ## Generate our configure-time sources in two
540: ## cases:
541: ## 1. `config.status' is run either explicitly, or via configure.
542: ## Esp. not when it is run in `Makefile' to generate makefiles and
543: ## config.h
544: ## 2. CONFIG_OTHER is set explicitly
545: ##
546: ## Case 1 is difficult. We know that `automake' sets one of
547: ## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
548: ## only when AM_CONFIG_HEADER is set, however.
549:
550: case "x$CONFIG_OTHER" in
551: *tmeconfig.h) gen_tmeconfig_h=yes
552: ;;
553: esac
554: if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
555: # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
556: if test "x${CONFIG_OTHER}" = x; then
557: gen_tmeconfig_h=yes
558: fi
559: fi
560:
561: ## If we're generating tmeconfig.h:
562: if test "x$gen_tmeconfig_h" = xyes; then
563: outfile=tmeconfig.h
564: echo "$as_me: creating $outfile"
565: cat <<TMEEOF > ${outfile}-tmp
566: /* tmeconfig.h
567: *
568: * This is an automatically generated file - please modify 'configure.in'.
569: */
570:
571: #ifndef _TMECONFIG_H
572: #define _TMECONFIG_H
573:
574: TMEEOF
1.1.1.2 root 575: (for word in HAVE_ TIME_ PROTO_ ALIGNOF_ SIZEOF_ WORDS_BIGENDIAN; do \
1.1 root 576: grep $word config.h | sed 's/#define[ ]\{1,\}/&_TME_/' ; \
577: done) | sort | uniq >> ${outfile}-tmp
1.1.1.3 root 578: grep FLOAT_FORMAT config.h | \
579: sed 's/#define[ ]\{1,\}\([A-Za-z0-9_]\{1,\}\)[ ]\{1,\}\([A-Za-z0-9_]\{1,\}\)/#define TME_\1 TME_FLOAT_FORMAT_\2/' >> ${outfile}-tmp
1.1 root 580: echo '#define TME_RELEASE_MAJOR (' \
581: `echo $VERSION | sed -e 's,^\([0-9][0-9]*\)\.[0-9][0-9]*$,\1,'` ')' >> ${outfile}-tmp
582: echo '#define TME_RELEASE_MINOR (' \
583: `echo $VERSION | sed -e 's,^[0-9][0-9]*\.\([0-9][0-9]*\)$,\1,'` ')' >> ${outfile}-tmp
584: echo '#define TME_BUILD_TARGET "'$target'"' >> ${outfile}-tmp
1.1.1.2 root 585: if test $ac_cv_sizeof_long = 8; then
586: echo '#define TME_HAVE_INT64_T' >> ${outfile}-tmp
587: echo 'typedef signed long tme_int64_t;' >> ${outfile}-tmp
588: echo 'typedef unsigned long tme_uint64_t;' >> ${outfile}-tmp
589: fi
1.1 root 590: if test $ac_cv_sizeof_int = 4; then
591: echo 'typedef signed int tme_int32_t;' >> ${outfile}-tmp
592: echo 'typedef unsigned int tme_uint32_t;' >> ${outfile}-tmp
593: elif test $ac_cv_sizeof_long = 4; then
594: echo 'typedef signed long tme_int32_t;' >> ${outfile}-tmp
595: echo 'typedef unsigned long tme_uint32_t;' >> ${outfile}-tmp
596: fi
597: if test $ac_cv_sizeof_int = 2; then
598: echo 'typedef signed int tme_int16_t;' >> ${outfile}-tmp
599: echo 'typedef unsigned int tme_uint16_t;' >> ${outfile}-tmp
600: elif test $ac_cv_sizeof_short = 2; then
601: echo 'typedef signed short tme_int16_t;' >> ${outfile}-tmp
602: echo 'typedef unsigned short tme_uint16_t;' >> ${outfile}-tmp
603: fi
604: echo 'typedef signed char tme_int8_t;' >> ${outfile}-tmp
605: echo 'typedef unsigned char tme_uint8_t;' >> ${outfile}-tmp
606: cat <<TMEEOF >> ${outfile}-tmp
607:
608: /* features that aren't currently controlled by a configure option: */
609: #define TME_THREADS_SJLJ
610:
611: #endif /* !_TMECONFIG_H */
612: TMEEOF
613: if cmp -s ${outfile}-tmp $outfile; then
614: echo "$as_me: $outfile is unchanged"
615: rm -f ${outfile}-tmp
616: else
617: mv ${outfile}-tmp ${outfile}
618: fi
619: fi
620: ], [
621: PACKAGE="$PACKAGE"
622: VERSION="$VERSION"
623: target="$target"
624: ac_cv_sizeof_int="$ac_cv_sizeof_int"
625: ac_cv_sizeof_long="$ac_cv_sizeof_long"
626: ac_cv_sizeof_short="$ac_cv_sizeof_short"
627: ])
628:
629: dnl Writes files.
630: AC_OUTPUT(Makefile
631: tme/Makefile
632: tme/ic/Makefile
633: tme/machine/Makefile
634: tme/generic/Makefile
1.1.1.2 root 635: tme/scsi/Makefile
1.1 root 636: libtme/Makefile
637: ic/Makefile
638: ic/m68k/Makefile
1.1.1.3 root 639: ic/ieee754/Makefile
1.1.1.4 ! root 640: ic/sparc/Makefile
1.1 root 641: machine/Makefile
642: machine/sun/Makefile
643: machine/sun2/Makefile
1.1.1.3 root 644: machine/sun3/Makefile
1.1.1.4 ! root 645: machine/sun4/Makefile
1.1 root 646: host/Makefile
647: host/posix/Makefile
648: host/bsd/Makefile
1.1.1.2 root 649: host/gtk/Makefile
1.1 root 650: bus/Makefile
651: bus/multibus/Makefile
1.1.1.4 ! root 652: bus/sbus/Makefile
1.1.1.2 root 653: serial/Makefile
654: scsi/Makefile
1.1 root 655: generic/Makefile
1.1.1.3 root 656: tmesh/Makefile
657: tools/Makefile)
1.1 root 658:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.