home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lzop-1.00.tar.gz / lzop-1.00.tar / lzop-1.00 / acinclude.m4 < prev    next >
Text File  |  1998-04-24  |  2KB  |  90 lines

  1. ## --------------------------------------------------------- ##
  2. ## My own customization.                                     ##
  3. ## --------------------------------------------------------- ##
  4.  
  5. # serial 2
  6.  
  7. AC_DEFUN(mfx_CUSTOMIZE,
  8. [
  9. mfx_PROG_CC_BUG_SIGNED_TO_UNSIGNED_CASTING
  10. mfx_PROG_GCC_BUG_SCHEDULE_INSNS
  11. mfx_PROG_GCC_BUG_STRENGTH_REDUCE
  12.  
  13. dnl /***********************************************************************
  14. dnl // Prepare some macros
  15. dnl ************************************************************************/
  16.  
  17. CFLAGS_GCC_OMIT_FRAME_POINTER=""
  18. if test "$GCC" = yes; then
  19.   CFLAGS_GCC_OMIT_FRAME_POINTER="-fomit-frame-pointer"
  20.   if test "$mfx_cv_prog_checkergcc" = yes; then
  21.     CFLAGS_GCC_OMIT_FRAME_POINTER="-fno-omit-frame-pointer"
  22.   fi
  23.   if test "$enable_debug" = yes; then
  24.     CFLAGS_GCC_OMIT_FRAME_POINTER="-fno-omit-frame-pointer"
  25.   fi
  26.   if test "$enable_profiling" = yes; then
  27.     CFLAGS_GCC_OMIT_FRAME_POINTER="-fno-omit-frame-pointer"
  28.   fi
  29.   if test "$enable_coverage" = yes; then
  30.     CFLAGS_GCC_OMIT_FRAME_POINTER="-fno-omit-frame-pointer"
  31.   fi
  32. fi
  33. AC_SUBST(CFLAGS_GCC_OMIT_FRAME_POINTER)dnl
  34.  
  35. if test "$enable_debug" = yes; then
  36.   test "$ac_cv_prog_cc_g" = yes && CFLAGS="$CFLAGS -g"
  37.   test "$ac_cv_prog_cxx_g" = yes && CXXFLAGS="$CXXFLAGS -g"
  38. fi
  39.  
  40.  
  41. dnl /***********************************************************************
  42. dnl // Compiler and architecture specific stuff
  43. dnl ************************************************************************/
  44.  
  45. AC_SUBST(M_CC)dnl
  46. AC_SUBST(M_ARCH)dnl
  47. AC_SUBST(M_CPU)dnl
  48.  
  49. M_CC="unknown"
  50. M_ARCH="unknown"
  51. M_CPU="$host_cpu"
  52.  
  53. if test "$GCC" = yes; then
  54.   M_CC="GCC"
  55.   if test "$enable_debug" = yes; then
  56.     CFLAGS_O="-O0"
  57.   else
  58.     CFLAGS_O="-O2"
  59.   fi
  60.   CFLAGS_W="-Wall -Wcast-align -Wwrite-strings"
  61.   case $host in
  62.     i[[34567]]86-*)
  63.       M_ARCH="i386"
  64.       mfx_unaligned_ok_2="yes"
  65.       mfx_unaligned_ok_4="yes"
  66.       CFLAGS_O="$CFLAGS_O -fno-strength-reduce"
  67.       ;;
  68.     *)
  69.       if test "$mfx_cv_prog_gcc_bug_strength_reduce" = yes; then
  70.         CFLAGS_O="$CFLAGS_O -fno-strength-reduce"
  71.       fi
  72.       ;;
  73.   esac
  74.   if test "$mfx_cv_prog_gcc_bug_schedule_insns" = yes; then
  75.     CFLAGS_O="$CFLAGS_O -fno-schedule-insns -fno-schedule-insns2"
  76.   fi
  77. else
  78.   CFLAGS_O="$CFLAGS_O"
  79. # CFLAGS_O="$CFLAGS_O -O"
  80.   CFLAGS_W="$CFLAGS_W"
  81. fi
  82.  
  83. AC_DEFINE_UNQUOTED(MFX_ARCH,"$M_ARCH")
  84. AC_DEFINE_UNQUOTED(MFX_CPU,"$host_cpu")
  85.  
  86. M_ARCH=`echo "$M_ARCH" | sed -e 's/[^a-zA-Z0-9]//g'`
  87. M_CPU=`echo "$M_CPU" | sed -e 's/[^a-zA-Z0-9]//g'`
  88. ])
  89.  
  90.