Alien-TinyCCx

 view release on metacpan or  search on metacpan

src/configure  view on Meta::CPAN

  --enable-cross           build cross compilers
  --with-selinux           use mmap for exec mem [needs writable /tmp]
  --sysincludepaths=...    specify system include paths, colon separated
  --libpaths=...           specify system library paths, colon separated
  --crtprefix=...          specify locations of crt?.o, colon separated
  --elfinterp=...          specify elf interpreter
  --triplet=...            specify system library/include directory triplet
EOF
#echo "NOTE: The object files are build at the place where configure is launched"
exit 1
fi

cc="${cross_prefix}${cc}"
ar="${cross_prefix}${ar}"
strip="${cross_prefix}${strip}"

CONFTEST=./conftest$EXESUF

if test -z "$cross_prefix" ; then
  if ! $cc -o $CONFTEST $source_path/conftest.c 2>/dev/null ; then
    echo "configure: error: '$cc' failed to compile conftest.c."
  else
    bigendian="$($CONFTEST bigendian)"
    gcc_major="$($CONFTEST version)"
    gcc_minor="$($CONFTEST minor)"
    if test "$mingw32" = "no" ; then

      if test -z "$triplet"; then
        tt="$($CONFTEST triplet)"
        if test -n "$tt" -a -f "/usr/lib/$tt/crti.o" ; then
          triplet="$tt"
        fi
      fi

      if test -z "$triplet"; then
        if test $cpu = "x86-64" -o $cpu = "aarch64" ; then
          if test -f "/usr/lib64/crti.o" ; then
            tcc_lddir="lib64"
          fi
        fi
      fi

      if test "$cpu" = "armv4l" ; then
	if test "${triplet%eabihf}" != "$triplet" ; then
	   confvars="$confvars arm_eabihf"
	elif test "${triplet%eabi}" != "$triplet" ; then
	   confvars="$confvars arm_eabi"
	fi
	if grep -s -q "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo ; then
	   confvars="$confvars arm_vfp"
	fi
      fi

      if test -f "/lib/ld-uClibc.so.0" ; then
	confvars="$confvars uClibc"
      fi

    fi
  fi
else
  # if cross compiling, cannot launch a program, so make a static guess
  case $cpu in
    powerpc|mips|s390)  bigendian=yes;;
  esac
fi

# a final configuration tuning
$cc -v --help > cc_help.txt 2>&1
W_OPTIONS="declaration-after-statement"
for i in $W_OPTIONS; do
    O_PRESENT="$(grep -- -W$i cc_help.txt)"
    if test -n "$O_PRESENT"; then  CFLAGS="$CFLAGS -W$i"; fi
done
W_OPTIONS="deprecated-declarations strict-aliasing pointer-sign sign-compare unused-result uninitialized"
for i in $W_OPTIONS; do
    O_PRESENT="$(grep -- -W$i cc_help.txt)"
    if test -n "$O_PRESENT"; then  CFLAGS="$CFLAGS -Wno-$i"; fi
done
F_OPTIONS="strict-aliasing"
for i in $F_OPTIONS; do
    O_PRESENT="$(grep -- -f$i cc_help.txt)"
    if test -n "$O_PRESENT"; then  CFLAGS="$CFLAGS -fno-$i"; fi
done
rm -f cc_help.txt

fcho() { if test -n "$2"; then echo "$1$2"; else echo "$1-"; fi }

echo "Binary  directory   $bindir"
echo "TinyCC directory    $tccdir"
echo "Library directory   $libdir"
echo "Include directory   $includedir"
echo "Manual directory    $mandir"
echo "Info directory      $infodir"
echo "Doc directory       $docdir"
fcho "Target root prefix  " "$sysroot"
echo "Source path         $source_path"
echo "C compiler          $cc"
echo "Target OS           $targetos"
echo "CPU                 $cpu"
echo "Big Endian          $bigendian"
echo "Profiling           $gprof"
echo "Cross compilers     $build_cross"
echo "Use libgcc          $use_libgcc"
fcho "Triplet             " "$triplet"
#if test "$disable_exsymtab" = "no" ; then
echo "tcc with exsymtab"
#fi

echo "Creating config.mak and config.h"

cat >config.mak <<EOF
# Automatically generated by configure - do not modify
prefix=$prefix
bindir=\$(DESTDIR)$bindir
tccdir=\$(DESTDIR)$tccdir
libdir=\$(DESTDIR)$libdir
includedir=\$(DESTDIR)$includedir
mandir=\$(DESTDIR)$mandir
infodir=\$(DESTDIR)$infodir
docdir=\$(DESTDIR)$docdir
CC=$cc



( run in 1.167 second using v1.01-cache-2.11-cpan-e1769b4cff6 )