home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / binutils-2.7-src.tgz / tar.out / fsf / binutils / libiberty / configure.in < prev    next >
Text File  |  1996-09-28  |  2KB  |  78 lines

  1. # This file is a shell script fragment that supplies the information
  2. # necessary for a configure script to process the program in
  3. # this directory.  For more information, look at ../configure.
  4.  
  5. configdirs=
  6. srctrigger=getopt1.c
  7. srcname="-liberty library"
  8.  
  9. # per-host:
  10.  
  11. files="alloca-norm.h"
  12. links="alloca-conf.h"
  13.  
  14. . ${srcdir}/config.table
  15. host_makefile_frag=${frag}
  16.  
  17. # per-target:
  18.  
  19. # post-target:
  20.  
  21. # If this is the target libiberty, check at compile time whether we are using
  22. # newlib.  If we are, we already know the files we need, since the linker
  23. # will fail when run on some of the newlib targets.
  24. if [ -n "${with_target_subdir}" ] ; then
  25.   cat > Makefile.tem <<'!EOF!'
  26. CONFIG_H = xconfig.h
  27. NEEDED_LIST = xneeded-list
  28.  
  29. xconfig.h: Makefile
  30.     if [ -f ../newlib/Makefile ]; then \
  31.       echo "#define NEED_sys_nerr 1" >xconfig.h; \
  32.       echo "#define NEED_sys_errlist 1" >>xconfig.h; \
  33.       echo "#define NEED_sys_siglist 1" >>xconfig.h; \
  34.       echo "#define NEED_psignal 1" >>xconfig.h; \
  35.     else \
  36.       $(MAKE) $(FLAGS_TO_PASS) lconfig.h; \
  37.       cp lconfig.h xconfig.h; \
  38.     fi
  39.  
  40. xneeded-list: Makefile
  41.     if [ -f ../newlib/Makefile ]; then \
  42.       echo insque.o random.o strdup.o alloca.o >xneeded-list; \
  43.     else \
  44.       $(MAKE) $(FLAGS_TO_PASS) lneeded-list; \
  45.       cp lneeded-list xneeded-list; \
  46.     fi
  47. !EOF!
  48. sed -e "/^####/  r Makefile.tem" \
  49.   -e '/INSTALL_DEST =/s/libdir/tooldir/' ${Makefile} > Makefile.tem3
  50. mv Makefile.tem3 ${Makefile}
  51. rm -f Makefile.tem
  52. fi
  53.  
  54. # We need multilib support, but only if configuring for the target.
  55. if [ -n "${with_target_subdir}" ] ; then
  56.   case ${srcdir} in
  57.   .)
  58.     if [ "${with_target_subdir}" != "." ] ; then
  59.  
  60.       # Set MULTISRCTOP to the value we need if we are not doing
  61.       # multilib.  This will be overridden if --enable-multilib was
  62.       # used.
  63.       sed -e "s:^MULTISRCTOP[     ]*=.*$:MULTISRCTOP = ../:" \
  64.     ${Makefile} > Makefile.tem
  65.       rm -f ${Makefile}
  66.       mv Makefile.tem ${Makefile}
  67.  
  68.       . ${srcdir}/${with_multisrctop}../../config-ml.in
  69.     else
  70.       . ${srcdir}/${with_multisrctop}../config-ml.in
  71.     fi
  72.     ;;
  73.   *)
  74.     . ${srcdir}/../config-ml.in
  75.     ;;
  76.   esac
  77. fi
  78.