📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script. -*- m4 -*-dnldnl $Id: configure.in,v 1.34 2002/01/07 14:58:16 erikm Exp $dnlAC_REVISION([$Id: configure.in,v 1.34 2002/01/07 14:58:16 erikm Exp $])dnl Init autoconfAC_INIT(src/blob/start.S)AC_CONFIG_AUX_DIR(tools)dnl Init automakePACKAGE=blobBLOB_MAJOR_VERSION=2BLOB_MINOR_VERSION=0BLOB_MICRO_VERSION=5-pre2BLOB_VERSION=$BLOB_MAJOR_VERSION.$BLOB_MINOR_VERSION.$BLOB_MICRO_VERSIONVERSION=$BLOB_VERSIONAM_INIT_AUTOMAKE($PACKAGE, $VERSION)AM_CONFIG_HEADER(include/blob/config.h)dnl Init maintainer modeAM_MAINTAINER_MODEdnl Guess the host OSAC_CANONICAL_HOSTdnl Do some basic checks to see if we are cross compilingdnl Hint: if we find arm-linux-whatever, we are cross compilingAC_CHECK_PROGS(CC, arm-linux-gcc gcc, echo)AC_CHECK_PROGS(OBJCOPY, arm-linux-objcopy objcopy, echo)AC_CHECK_PROGS(RANLIB, arm-linux-ranlib ranlib, echo)AC_CHECK_PROGS(AR, arm-linux-ar ar, echo)dnl Checks for programs.AC_PROG_CCif test "x$ac_cv_prog_gcc" != "xyes" ; then AC_MSG_WARN("C compiler is not gcc. This may lead to problems!"); AC_MSG_WARN("Trying to continue with $CC ...");fiAC_PROG_RANLIBAC_PROG_INSTALLAC_PROG_LN_Sdnl Checks for libraries.dnl Checks for header files.dnl Check board we want to build forAC_ARG_WITH(board, [ --with-board=NAME Name of the target board Valid names are: assabet Intel Assabet lubbock Intel Lubbock neponset Intel Assabet with Neponset board badge4 HPL Badge 4 brutus Intel Brutus creditlart CreditLART h3600 Compaq Ipaq H36x0 idr Vercel UD-1 jornada720 HP Jornada 720 with Flash board lart LART nesa NESA pleb PLEB shannon TuxScreen (Shannon) system3 Prueftechnik Digital Board Default board is lart], board_name="$withval", board_name="lart")AC_MSG_CHECKING(target board)case "$board_name" in assabet) board_name="Intel Assabet" AC_DEFINE(ASSABET) BLOB_PLATFORM_OBJ="assabet.o" AC_MSG_WARN([Please check assabet memory config in arch/assabet.h]) BLOB_FLASH_OBJS="intel32.o" DIAG_PLATFORM_OBJ="assabet.o" use_cpu="sa1110" use_lcd="no" ;; lubbock) board_name="Intel Lubbock" AC_DEFINE(LUBBOCK) BLOB_PLATFORM_OBJ="lubbock.o" AC_MSG_WARN([Please check Lubbock memory config in arch/assabet.h]) BLOB_FLASH_OBJS="intel16.o" DIAG_PLATFORM_OBJ="lubbock.o" use_cpu="pxa250" use_lcd="no" ;; neponset) board_name="Intel Assabet with Neponset Expansion Board" AC_DEFINE(ASSABET) AC_DEFINE(NEPONSET) BLOB_PLATFORM_OBJ="assabet.o" AC_MSG_WARN([Please check assabet memory config in arch/assabet.h]) BLOB_FLASH_OBJS="intel32.o" DIAG_PLATFORM_OBJ="assabet.o" use_cpu="sa1110" use_lcd="no" ;; brutus) board_name="Intel Brutus" AC_DEFINE(BRUTUS) BLOB_PLATFORM_OBJ="brutus.o" AC_MSG_WARN([Please check Brutus flash]) BLOB_FLASH_OBJS="nullflash.o" DIAG_PLATFORM_OBJ="brutus.o" use_cpu="sa1100" use_lcd="no" ;; creditlart) board_name="Delft University of Technology CreditLART" AC_DEFINE(CLART) BLOB_PLATFORM_OBJ="clart.o" AC_MSG_WARN([Please check creditlart memory config in arch/clart.h]) BLOB_FLASH_OBJS="intel16.o" DIAG_PLATFORM_OBJ="clart.o" use_cpu="sa1110" use_lcd="no" ;; h3600) board_name="Compaq Ipaq H3600 series" AC_DEFINE(H3600) BLOB_PLATFORM_OBJ="h3600.o" AC_MSG_WARN([Warning: untested platform!]) AC_MSG_WARN([Please check h3600 memory config in arch/h3600.h]) BLOB_FLASH_OBJS="intel32.o" DIAG_PLATFORM_OBJ="h3600.o" use_cpu="sa1110" use_lcd="no" ;; idr) board_name="Vercel UD-1 (IDR)" AC_DEFINE(IDR) BLOB_PLATFORM_OBJ="idr.o" BLOB_FLASH_OBJS="intel16.o" DIAG_PLATFORM_OBJ="idr.o" use_cpu="sa1110" use_lcd="no" ;; lart) board_name="Delft University of Technology LART" AC_DEFINE(LART) BLOB_PLATFORM_OBJ="lart.o" BLOB_FLASH_OBJS="intel32.o" DIAG_PLATFORM_OBJ="lart.o" use_cpu="sa1100" use_lcd="no" ;; nesa) board_name="NESA" AC_DEFINE(NESA) BLOB_PLATFORM_OBJ="nesa.o" BLOB_FLASH_OBJS="amd32.o" DIAG_PLATFORM_OBJ="nesa.o" use_cpu="sa1100" use_lcd="no" ;; pleb) board_name="University of New South Wales PLEB" AC_DEFINE(PLEB) BLOB_PLATFORM_OBJ="pleb.o" AC_MSG_WARN([Please check PLEB flash]) BLOB_FLASH_OBJS="nullflash.o" DIAG_PLATFORM_OBJ="pleb.o" use_cpu="sa1100" use_lcd="no" ;; shannon) board_name="TuxScreen (Shannon)" AC_DEFINE(SHANNON) BLOB_PLATFORM_OBJ="shannon.o" BLOB_FLASH_OBJS="amd32.o" DIAG_PLATFORM_OBJ="shannon.o" use_cpu="sa1100" use_lcd="no" ;; system3) board_name="Prueftechnik Digital Board" AC_DEFINE(PT_SYSTEM3) BLOB_PLATFORM_OBJ="system3.o" BLOB_FLASH_OBJS="intel32.o" DIAG_PLATFORM_OBJ="system3.o" use_cpu="sa1110" use_lcd="yes" ;; jornada720) board_name="Hewlett-Packard Jornada 720 with flash daughter board" AC_DEFINE(JORNADA720) BLOB_PLATFORM_OBJ="jornada720.o" AC_MSG_WARN([Warning: untested platform!]) BLOB_FLASH_OBJS="intel32.o" DIAG_PLATFORM_OBJ="jornada720.o" use_cpu="sa1110" use_lcd="no" ;; badge4) board_name="Hewlett-Packard Laboratories Badge-4" AC_DEFINE(BADGE4) BLOB_PLATFORM_OBJ="badge4.o" BLOB_FLASH_OBJS="intel16.o" DIAG_PLATFORM_OBJ="badge4.o" use_cpu="sa1110" use_lcd="no" ;; *) AC_MSG_RESULT(unknown) AC_MSG_ERROR([Unknown board name, bailing out]) ;;esacdnl define board name in configurationAC_MSG_RESULT("${board_name}")AC_DEFINE_UNQUOTED(BOARD_NAME, "${board_name}")AC_ARG_WITH(cpu, [ --with-cpu=NAME Name of the target cpu Valid names are: pxa250 Intel PXA250 pxa255 Intel PXA255 pxa262 Intel Dalhart with builtin Flash(256x16) Default cpu is pxa255], use_cpu="$withval", use_cpu="pxa255")AC_ARG_WITH(eth, [ --wtih-eth=NAME Name of the ethernet interface Valid names are: smc91x SMC91c96/SMC91c111 Ethernet Controller usb Intel Ethernet Over USB Default eth is usb], use_eth="$withval", use_eth="none")AC_MSG_CHECKING(target cpu)case "$use_cpu" in sa1100) dnl SA1100 CPU: EDORAM memory setup code MEMSETUP="memsetup-sa1100.o" ;; sa1110) dnl SA1110 CPU: SDRAM memory setup code MEMSETUP="memsetup-sa1110.o" ;; pxa250) dnl PXA250 CPU: SDRAM memory setup code MEMSETUP="memsetup-pxa.o" BLOB_FLASH_OBJS="intel32.o" ;; pxa255) dnl PXA255 CPU: SDRAM memory setup code MEMSETUP="memsetup-pxa.o" BLOB_FLASH_OBJS="intel32.o" ;; pxa262) dnl PXA262: 16-bit flash, 32-bit SDRAM MEMSETUP="memsetup-pxa.o" BLOB_FLASH_OBJS="intel16.o" ;; *) AC_MSG_WARN([No CPU defined!]); use_cpu="(none)" MEMSETUP=""esacAC_MSG_CHECKING(Ethernet support)case "$use_eth" in usb) BLOB_ETH_OBJS="usb-eth.o net.o" ;; smc91x) BLOB_ETH_OBJS="smc91x.o net.o" ;; *) BLOB_ETH_OBJS="";esacAC_SUBST(MEMSETUP)AC_DEFINE_UNQUOTED(CPU, "${use_cpu}")dnl Find out where the Linux headers areAC_ARG_WITH(linux-prefix,[ --with-linux-prefix=PFX Prefix where the ARM Linux sources live], linux_prefix="$withval", linux_prefix="/usr/src/linux")dnl Do some sanity checksAC_MSG_CHECKING([if the Linux source tree in $linux_prefix is sane])if test ! -d "$linux_prefix/include" ; then AC_MSG_RESULT([no]) AC_MSG_ERROR([$linux_prefix doesn't look like a configured Linux source tree.]) AC_MSG_ERROR([Please supply a proper prefix with the --with-linux-prefix flag]) exit -1fiif test ! -f "$linux_prefix/include/asm/setup.h" ; then AC_MSG_RESULT([no]) AC_MSG_ERROR([The Linux source tree in $linux_prefix is not configured.]) AC_MSG_ERROR([Please run "make lart_config ; yes no | make old_config" in the]) AC_MSG_ERROR([Linux source tree and retry.]) exit -1fiAC_MSG_RESULT([yes])CFLAGS=`echo $CFLAGS -I${linux_prefix}/include`dnl Check for individual featuresAC_ARG_ENABLE(clock-scaling,[ --enable-clock-scaling Enable support for clock scaling (SA1100 only)],[clock_scaling_flag=$enable_clock_scaling],[clock_scaling_flag=no])AC_ARG_ENABLE(memtest,[ --enable-memtest Enable support for memory tests ],[chkmem_flag=$enable_memtest],[chkmem_flag=no])AC_ARG_ENABLE(debug,[ --enable-debug Enable support for misc debugging functions ],[debug_flag=$enable_debug],[debug_flag=no])AC_ARG_ENABLE(lcd,[ --enable-lcd Enable lcd support ],[lcd_flag=$enable_lcd],[lcd_flag=no])AC_ARG_ENABLE(md5,[ --enable-md5 Enable md5 support ],[md5_flag=$enable_md5],[md5_flag=no])AC_ARG_ENABLE(usb,[ --enable-usb Enable USB support ],[usb_flag=$enable_usb],[usb_flag=no])dnl Check if the user wants *all* featuresAC_ARG_ENABLE(all-features,[ --enable-all-features Enable all features],[all_features_flag=$enable_all_features],[all_features_flag=no])if test "x$all_features_flag" = "xyes" ; then clock_scaling_flag=yes chkmem_flag=yes debug_flag=yes lcd_flag=yes md5_flag=yesfidnl Check wether or not clock scaling code is wantedif test "x$clock_scaling_flag" = "xyes" ; then if test "x$use_cpu" = "xsa1100"; then CLOCK="clock.o" else AC_MSG_WARN([No clock scaling support for SA1110 CPUs, disabling]) clock_scaling_flag=no CLOCK="" fifiif test "x$usb_flag" = "xyes" ; then if test "x$use_cpu" = "xpxa250"; then BLOB_USB_OBJS="usb_ctl_pxa.o usb_ep0_pxa.o usb_ep1_pxa.o usb_ep2_pxa.o" elif test "x$use_cpu" = "xpxa255"; then BLOB_USB_OBJS="usb_ctl_pxa.o usb_ep0_pxa.o usb_ep1_pxa.o usb_ep2_pxa.o" elif test "x$use_cpu" = "xpxa262"; then BLOB_USB_OBJS="usb_ctl_pxa.o usb_ep0_pxa.o usb_ep1_pxa.o usb_ep2_pxa.o" else AC_MSG_WARN([No USB support for target CPU, disabling]) usb_flag=no BLOB_USB_OBJS="" fifiAC_SUBST(CLOCK)dnl Check wether or not memtest code is wantedif test "x$chkmem_flag" = "xyes" ; then CHKMEM="chkmem.o"fiAC_SUBST(CHKMEM)dnl Check wether or not debug code is wantedif test "x$debug_flag" = "xyes" ; then DEBUG="debug.o"fiAC_SUBST(DEBUG)dnl Check wether or not lcd support code is wantedif test "x$lcd_flag" = "xyes" ; then if test "x$use_lcd" = "xyes" ; then LCD="lcd.o" AC_DEFINE(CONFIG_LCD_SUPPORT) else AC_MSG_WARN([No LCD support for ${board_name}, disabling]) LCD="" lcd_flag="no" fifiAC_SUBST(LCD)dnl Check wether or not MD5 support is wantedif test "x$md5_flag" = "xyes" ; then AC_DEFINE(CONFIG_MD5_SUPPORT)fidnl Check wether or not additional platform source codednl for is neededAC_SUBST(BLOB_FLASH_OBJS)AC_SUBST(BLOB_ETH_OBJS)AC_SUBST(BLOB_USB_OBJS)AC_SUBST(BLOB_PLATFORM_OBJ)AC_SUBST(DIAG_PLATFORM_OBJ)dnl Check for extra debug infoAC_ARG_ENABLE(blob-debug,[ --enable-blob-debug Enable run-time debug information],[blob_debug_flag=$enable_blob_debug],[blob_debug_flag=no])if test "x$blob_debug_flag" = "xyes" ; then AC_DEFINE(BLOB_DEBUG)fidnl Checks for typedefs, structures, and compiler characteristics.AC_C_INLINEdnl Checks for library functions.dnl Add C flags to display more warningsAC_MSG_CHECKING(for C flags to get more warnings)ac_save_CFLAGS="$CFLAGS"AC_LANG_SAVEif test "x$ac_cv_prog_gcc" = "xyes" ; then dnl gcc is the easiest C compiler warning_CFLAGS="-Wall"fiAC_LANG_RESTORECFLAGS="$ac_save_CFLAGS"if test "$warning_CFLAGS" = "none" ; then AC_MSG_RESULT(none)else CFLAGS="$CFLAGS $warning_CFLAGS" AC_MSG_RESULT($warning_CFLAGS)fi dnl Remove the "-g" flag from CFLAGS and LDFLAGSCFLAGS=`echo $CFLAGS | sed 's/\ *-g\ */\ /'`LDFLAGS=`echo $LDFLAGS | sed 's/\ *-g\ */\ /'`CCAS=`echo $CC`CCASFLAGS=`echo $CFLAGS -D__ASSEMBLY__ `dnl Change the "-O2" flag in "-Os"CFLAGS=`echo $CFLAGS | sed 's/-O2/-Os/'`dnl Add some StrongARM specific flagsCFLAGS=`echo $CFLAGS -march=armv4 -mtune=strongarm1100 -fomit-frame-pointer -fno-builtin -mapcs-32 -DCPU_$use_cpu`LDFLAGS=`echo $LDFLAGS -static -nostdlib`OCFLAGS="-O binary -R .note -R .comment -R .bss -S"AC_SUBST(OCFLAGS)AC_OUTPUT(Makefiledoc/Makefileinclude/Makefileinclude/blob/Makefileinclude/blob/arch/Makefilesrc/Makefilesrc/blob/Makefilesrc/diag/Makefilesrc/lib/Makefiletools/Makefileutils/Makefileutils/build/Makefileutils/mkparamblock/Makefile)echo ""echo "Configuration"echo "------------------------------------------------------------------------"echo "Target cpu ${use_cpu}"echo "Target board ${board_name}"echo "C compiler ${CC}"echo "C flags ${CFLAGS}"echo "Linker flags ${LDFLAGS}"echo "Objcopy tool ${OBJCOPY}"echo "Objcopy flags ${OCFLAGS}"echo "Ethernet support ${use_eth}"echo "USB support ${usb_flag}"echo "Clock scaling support ${clock_scaling_flag}"echo "Memory test support ${chkmem_flag}"echo "Debugging commands support ${debug_flag}"echo "LCD support ${lcd_flag}"echo "MD5 support ${md5_flag}"echo "Run-time debug information ${blob_debug_flag}"echo ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -