Annotation of generator/configure.in, revision 1.1.1.1

1.1       root        1: dnl Generator configure.in file - process with autoconf
                      2: 
                      3:   AC_INIT(cpu68k/def68k.c)
                      4:   AC_CANONICAL_SYSTEM
                      5:   AM_INIT_AUTOMAKE(generator, 0.32)
                      6:   AM_CONFIG_HEADER(config.h)
                      7:   optimum=yes
                      8: 
                      9: dnl See what version we're compiling
                     10: 
                     11:   AC_ARG_ENABLE(svgalib, [Create svgalib version], PROGRAM="generator-svgalib")
                     12:   AC_ARG_ENABLE(allegro, [Create allegro version], PROGRAM="generator-allegro")
                     13:   AC_ARG_ENABLE(tcltk, [Create tcltk version], PROGRAM="generator-tcltk")
                     14:   # AC_ARG_ENABLE(gtk, [Create gtk version], PROGRAM="generator-gtk")
                     15:   if [[ "x$PROGRAM" = "x" ]]; then
                     16:     AC_MSG_ERROR(You must select a user interface type: svgalib allegro tcltk)
                     17:   fi
                     18:   AC_SUBST(PROGRAM)
                     19:   if [[ "x$program" = "xgenerator-allegro" ]]; then
                     20:     AC_DEFINE(ALLEGRO, 1, [Allegro version])
                     21:   fi
                     22:   AC_DEFINE(RAZE, 1, [Define for RAZE z80, undef for mz80])
                     23: 
                     24: dnl Check for processor.
                     25: 
                     26:   case $target_cpu in
                     27:     i?86)  AC_MSG_RESULT(Turning on x86 processor optimisations)
                     28:            AC_DEFINE(PROCESSOR_INTEL, 1, [Define if you have an x86 processor])
                     29:            ALIGNLONGS=1
                     30:            ;;
                     31:     sparc) AC_MSG_RESULT(Turning on sparc processor optimisations)
                     32:            AC_DEFINE(PROCESSOR_SPARC, 1, [Define if you have a sparc processor])
                     33:            ALIGNLONGS=0
                     34:            ;;
                     35:     arm)   AC_MSG_RESULT(Turning on arm processor optimisations)
                     36:            AC_DEFINE(PROCESSOR_ARM, 1, [Define if you have an ARM processor])
                     37:            ALIGNLONGS=1
                     38:            ;;
                     39:     *)     AC_MSG_WARN(Processor type not known - processor optimisations off!)
                     40:            ALIGNLONGS=1
                     41:            optimum=no
                     42:            ;;
                     43:   esac
                     44:   
                     45:   AC_DEFINE(ALIGNLONGS, ALIGNLONGS,
                     46:             [Undefine if your processor can read unaligned 32-bit values])
                     47: 
                     48: dnl Check for gcc options
                     49: 
                     50:   # default to gcc version 2
                     51:   GCCVER=2
                     52:   WARN=no
                     53:   DEBUG=no
                     54:   AC_ARG_WITH(warnings, [  --with-warnings         Turn on gcc warnings],
                     55:               WARN=$withval, WARN=no)
                     56:   AC_ARG_WITH(gcc, [  --with-gcc[=VER]    GCC optimisation setting],
                     57:               GCCVER=$withval)
                     58:   AC_ARG_WITH(debug, [  --with-debug        Turn debugging options on],
                     59:               DEBUG=$withval, DEBUG=no)
                     60:   if [[ "x$WARN" != "xno" ]]; then
                     61:     CFLAGS="$CFLAGS -W -Wall -Wstrict-prototypes -Wno-format -Wno-unused"
                     62:   fi
                     63:   if [[ "x$DEBUG" != "xno" ]]; then
                     64:     AC_MSG_RESULT(Turning on debug flags)
                     65:     CFLAGS="$CFLAGS -g -O"
                     66:     optimum=no
                     67:   else
                     68:     if [[ "x$GCCVER" != "xno" ]]; then
                     69:       AC_MSG_RESULT(Turning on gcc optimisations)
                     70:       CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer"
                     71:       if [[ "x$GCCVER" = "x3" ]]; then
                     72:         AC_MSG_RESULT(Turning on gcc 3 optimisations)
                     73:         CFLAGS="$CFLAGS -minline-all-stringops -fno-math-errno"
                     74:       fi
                     75:       case $target_cpu in
                     76:         i?86) AC_MSG_RESULT(Turning on pentium optimisations)
                     77:               CFLAGS="$CFLAGS -march=pentium -malign-double -malign-loops=5"
                     78:               CFLAGS="$CFLAGS -malign-jumps=5 -malign-functions=5"
                     79:               ;;
                     80:       esac
                     81:     else
                     82:       AC_MSG_WARN(You did not opt for gcc optimisations!)
                     83:       optimum=no
                     84:     fi
                     85:   fi
                     86: 
                     87: dnl Checks for programs.
                     88: 
                     89:   AC_PROG_CC
                     90:   AC_PROG_RANLIB
                     91:   AC_ISC_POSIX
                     92:   AC_PROG_INSTALL
                     93:   AC_TYPE_SIGNAL
                     94: 
                     95: dnl Checks for libraries.
                     96: 
                     97: dnl Checks for header files.
                     98: 
                     99:   AC_HEADER_STDC
                    100: 
                    101: dnl Checks for typedefs, structures, and compiler characteristics.
                    102: 
                    103:   if [[ $cross_compiling = no ]]; then
                    104:     AC_C_BIGENDIAN
                    105:   else
                    106:     AC_WARN(Assuming little endian for cross compilation)
                    107:     # AC_DEFINE(WORDS_BIGENDIAN, 1)
                    108:   fi
                    109:   AC_C_CONST
                    110:   AC_C_INLINE
                    111:   AC_CHECK_SIZEOF(unsigned char, 1)
                    112:   AC_CHECK_SIZEOF(unsigned short, 2)
                    113:   AC_CHECK_SIZEOF(unsigned int, 4)
                    114:   AC_CHECK_SIZEOF(unsigned long, 4)
                    115:   AC_CHECK_SIZEOF(unsigned long long, 8)
                    116:   AC_CHECK_FUNCS(snprintf)
                    117:   AC_CHECK_HEADERS(tcl8.0.h)
                    118:   AC_CHECK_HEADERS(tk8.0.h)
                    119: 
                    120: dnl Makefile substitutions
                    121: 
                    122: dnl Final stuff
                    123: 
                    124:   AC_OUTPUT([Makefile cpu68k/Makefile raze/Makefile ym2612/Makefile
                    125:              main/Makefile])
                    126: 
                    127:   if [[ $optimum = no ]]; then
                    128:     echo '!!! Generator was compiled non-optimally, see warnings above !!!' 1>&2
                    129:   fi
                    130: 
                    131: dnl Moooo.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.