Annotation of generator/configure.in, revision 1.1.1.2

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

unix.superglobalmegacorp.com

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