Annotation of generator/configure.ac, revision 1.1

1.1     ! root        1: dnl Generator configure.in file - process with autoconf
        !             2: 
        !             3:   AC_INIT(cpu68k/def68k.c)
        !             4:   AC_PREREQ(2.52)
        !             5:   AC_CANONICAL_SYSTEM
        !             6:   AM_INIT_AUTOMAKE(generator, 0.35)
        !             7:   AM_CONFIG_HEADER(config.h)
        !             8:   optimum=yes
        !             9: 
        !            10: dnl See what version we're compiling
        !            11: 
        !            12:   MY_DIST_SUBDIRS="cpu68k raze cmz80 ym2612 sn76496 main glade gtkopts"
        !            13:   MY_SUBDIRS="cpu68k ym2612 sn76496 main"
        !            14:   MY_LIBS=""
        !            15:   UNDERSCORE=""
        !            16:   ASMOUTPUT=elf
        !            17:   AC_ARG_WITH(coffasm,
        !            18:               AC_HELP_STRING([--with-coffasm], [Assemble coff files]),
        !            19:               ASMOUTPUT=coff; UNDERSCORE="_")
        !            20:   AC_ARG_WITH(svgalib,
        !            21:               AC_HELP_STRING([--with-svgalib], [Create svgalib version]),
        !            22:               MY_PROG="generator-svgalib")
        !            23:   AC_ARG_WITH(allegro,
        !            24:               AC_HELP_STRING([--with-allegro], [Create allegro version]),
        !            25:               MY_PROG="generator-allegro")
        !            26:   AC_ARG_WITH(tcltk,
        !            27:               AC_HELP_STRING([--with-tcltk], [Create tcltk version]),
        !            28:               MY_PROG="generator-tcltk")
        !            29:   AC_ARG_WITH(gtk,
        !            30:               AC_HELP_STRING([--with-gtk], [Create gtk version]),
        !            31:               MY_PROG="generator-gtk")
        !            32:   if [[ "x$MY_PROG" = "x" ]]; then
        !            33:     AC_MSG_ERROR(You must select a user interface type:
        !            34:     svgalib allegro tcltk gtk)
        !            35:   fi
        !            36:   if [[ "x$MY_PROG" = "xgenerator-allegro" ]]; then
        !            37:     AC_DEFINE(ALLEGRO, 1, [Allegro version])
        !            38:     PROGRAM='generator-allegro$(EXEEXT)'
        !            39:   else
        !            40:     PROGRAM=$MY_PROG
        !            41:   fi
        !            42:   AC_ARG_WITH(raze,
        !            43:               AC_HELP_STRING([--with-raze], [Use RAZE z80 emulation]),
        !            44:               Z80="raze")
        !            45:   AC_ARG_WITH(cmz80,
        !            46:               AC_HELP_STRING([--with-cmz80], [Use C mz80 z80 emulation]),
        !            47:               Z80="cmz80")
        !            48:   if [[ "x$Z80" = "xraze" ]]; then
        !            49:     MY_SUBDIRS="raze $MY_SUBDIRS"
        !            50:     MY_LIBS="../raze/libraze.a $MY_LIBS"
        !            51:     AC_DEFINE(RAZE, 1, [Define to use RAZE z80 emulation])
        !            52:   elif [[ "x$Z80" = "xcmz80" ]]; then
        !            53:     MY_SUBDIRS="cmz80 $MY_SUBDIRS"
        !            54:     MY_LIBS="../cmz80/libcmz80.a $MY_LIBS"
        !            55:     AC_DEFINE(CMZ80, 1, [Define to use the portable C mz80 z80 emulation])
        !            56:   else
        !            57:     AC_MSG_ERROR(You must select a z80 emulator: raze cmz80)
        !            58:   fi
        !            59:   AC_DEFINE(DIRECTRAM, 1, [Define for direct ram writes (faster)])
        !            60:   AC_SUBST(PROGRAM)
        !            61:   AC_SUBST(ASMOUTPUT)
        !            62:   AC_SUBST(UNDERSCORE)
        !            63:   AC_SUBST(MY_LIBS)
        !            64:   AC_SUBST(MY_SUBDIRS)
        !            65:   AC_SUBST(MY_DIST_SUBDIRS)
        !            66: 
        !            67: dnl Check for processor.
        !            68: 
        !            69:   case $target_cpu in
        !            70:     i?86)  AC_MSG_RESULT(Turning on x86 processor optimisations)
        !            71:            AC_DEFINE(PROCESSOR_INTEL, 1, [Define if you have an x86 processor])
        !            72:            ALIGNLONGS=1
        !            73:            ;;
        !            74:     sparc) AC_MSG_RESULT(Turning on sparc processor optimisations)
        !            75:            AC_DEFINE(PROCESSOR_SPARC, 1, [Define if you have a sparc processor])
        !            76:            ALIGNLONGS=0
        !            77:            ;;
        !            78:     arm)   AC_MSG_RESULT(Turning on arm processor optimisations)
        !            79:            AC_DEFINE(PROCESSOR_ARM, 1, [Define if you have an ARM processor])
        !            80:            ALIGNLONGS=1
        !            81:            ;;
        !            82:     *)     AC_MSG_WARN(Processor type not known - processor optimisations off!)
        !            83:            ALIGNLONGS=1
        !            84:            optimum=no
        !            85:            ;;
        !            86:   esac
        !            87:   
        !            88:   AC_DEFINE(ALIGNLONGS, ALIGNLONGS,
        !            89:             [Undefine if your processor can read unaligned 32-bit values])
        !            90: 
        !            91: dnl Check for gcc options
        !            92: 
        !            93:   # default to gcc version 2
        !            94:   GCCVER=2
        !            95:   WARN=no
        !            96:   DEBUG=no
        !            97:   AC_ARG_WITH(nologging, AC_HELP_STRING([--with-nologging],
        !            98:                                         [Turn off all logging]),
        !            99:               AC_DEFINE(NOLOGGING, 1, [Define to turn off all logging]))
        !           100:   AC_ARG_WITH(warnings, AC_HELP_STRING([--with-warnings],
        !           101:                                        [Turn on gcc warnings]),
        !           102:               WARN=$withval, WARN=no)
        !           103:   AC_ARG_WITH(gcc, AC_HELP_STRING([--with-gcc@<:@=VER@:>@],
        !           104:                                   [GCC optimisation setting]),
        !           105:               GCCVER=$withval)
        !           106:   AC_ARG_WITH(raze, AC_HELP_STRING([--with-raze],
        !           107:                                    [Use raze z80 emulation]),
        !           108:               RAZE=$withval, DEBUG=no)
        !           109:   AC_ARG_WITH(debug, AC_HELP_STRING([--with-debug],
        !           110:                                     [Turn debugging options on]),
        !           111:               DEBUG=$withval, DEBUG=no)
        !           112:   if [[ "x$WARN" != "xno" ]]; then
        !           113:     CFLAGS="$CFLAGS -W -Wall -Wstrict-prototypes -Wformat -Wunused"
        !           114:   fi
        !           115:   if [[ "x$DEBUG" != "xno" ]]; then
        !           116:     AC_MSG_RESULT(Turning on debug flags)
        !           117:     CFLAGS="$CFLAGS -g -O"
        !           118:     optimum=no
        !           119:   else
        !           120:     if [[ "x$GCCVER" != "xno" ]]; then
        !           121:       AC_MSG_RESULT(Turning on gcc optimisations)
        !           122:       CFLAGS="$CFLAGS -O3 -ffast-math -fomit-frame-pointer"
        !           123:       if [[ "x$GCCVER" = "x3" ]]; then
        !           124:         AC_MSG_RESULT(Turning on gcc 3 optimisations)
        !           125:         CFLAGS="$CFLAGS -minline-all-stringops -fno-math-errno"
        !           126:       fi
        !           127:       case $target_cpu in
        !           128:         i?86) AC_MSG_RESULT(Turning on pentium optimisations)
        !           129:               # cannot do malign-double as we link to other libraries and it
        !           130:               # would break binary compatibility
        !           131:               CFLAGS="$CFLAGS -march=pentium -malign-loops=5"
        !           132:               CFLAGS="$CFLAGS -malign-jumps=5 -malign-functions=5"
        !           133:               ;;
        !           134:       esac
        !           135:     else
        !           136:       AC_MSG_WARN(You did not opt for gcc optimisations!)
        !           137:       optimum=no
        !           138:     fi
        !           139:   fi
        !           140:   AC_CHECK_LIB(jpeg, jpeg_start_compress, 
        !           141:     [ MY_LIBS="-ljpeg $MY_LIBS"; AC_DEFINE(JPEG, 1, [JPEG features]) ])
        !           142: 
        !           143: dnl Checks for programs.
        !           144: 
        !           145:   AC_PROG_CC
        !           146:   AC_PROG_RANLIB
        !           147:   AC_PROG_MAKE_SET
        !           148:   AC_ISC_POSIX
        !           149:   AC_PROG_INSTALL
        !           150:   AC_TYPE_SIGNAL
        !           151: 
        !           152: dnl Checks for header files.
        !           153: 
        !           154:   AC_HEADER_STDC
        !           155: 
        !           156: dnl Checks for libraries.
        !           157: 
        !           158:   if [[ "x$MY_PROG" = "xgenerator-gtk" ]]; then
        !           159:     MY_SUBDIRS="glade gtkopts $MY_SUBDIRS"
        !           160:     AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(Generator needs gtk 1.2.0 or later))
        !           161:     AM_PATH_SDL(1.1.0,,AC_MSG_ERROR(Generator needs sdk 1.1.0 or later))
        !           162:   fi
        !           163: 
        !           164: dnl Checks for typedefs, structures, and compiler characteristics.
        !           165: 
        !           166:   if [[ $cross_compiling = no ]]; then
        !           167:     AC_C_BIGENDIAN
        !           168:   else
        !           169:     AC_WARN(Assuming little endian for cross compilation)
        !           170:     # AC_DEFINE(WORDS_BIGENDIAN, 1)
        !           171:   fi
        !           172:   AC_C_CONST
        !           173:   AC_C_INLINE
        !           174:   AC_CHECK_SIZEOF(unsigned char, 1)
        !           175:   AC_CHECK_SIZEOF(unsigned short, 2)
        !           176:   AC_CHECK_SIZEOF(unsigned int, 4)
        !           177:   AC_CHECK_SIZEOF(unsigned long, 4)
        !           178:   AC_CHECK_SIZEOF(unsigned long long, 8)
        !           179:   AC_CHECK_FUNCS(snprintf)
        !           180:   AC_CHECK_HEADERS(tcl8.0.h)
        !           181:   AC_CHECK_HEADERS(tk8.0.h)
        !           182: 
        !           183: dnl Makefile substitutions
        !           184: 
        !           185: dnl Final stuff
        !           186: 
        !           187:   AC_OUTPUT([Makefile cpu68k/Makefile raze/Makefile cmz80/Makefile
        !           188:              ym2612/Makefile main/Makefile sn76496/Makefile glade/Makefile
        !           189:              gtkopts/Makefile raze/raze.asm])
        !           190: 
        !           191:   if [[ $optimum = no ]]; then
        !           192:     echo '!!! Generator was compiled non-optimally, see warnings above !!!' 1>&2
        !           193:   fi
        !           194: 
        !           195: dnl Moooo.

unix.superglobalmegacorp.com

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