view configure @ 593:a283eb90c0f7

Pay attention to CC_HEADERPATH out of ./configure
author Rob Landley <rob@landley.net>
date Tue, 08 Apr 2008 23:27:49 -0500
parents 5f6935ca2b71
children
line wrap: on
line source

#!/bin/bash

# Set lots of environment variables to default values.  All of these are
# overridden by existing local variables, if any.

# You don't have to run ./configure before running make, since make/make.sh
# sources this file, but it shouldn't hurt anything if you do.

[ -z "$CC" ] && CC=cc
[ -z "$HOSTCC" ] && HOSTCC=cc
[ -z "$AR" ] && AR=ar
[ -z "$STRIP" ] && STRIP=strip
[ -z "$LIBSUF" ] && LIBSUF=.a
[ -z "$EXESUF" ] && EXESUF=
[ -z "$CFLAGS" ] && CFLAGS="-g -Wall -fsigned-char -Os -fno-strict-aliasing"
[ -z "$LIBS" ] && LIBS="-lm -ldl"
[ -z "$HOST" ] && HOST=$(uname -m | sed 's/i.86/i386/')
[ -z "$PREFIX" ] && PREFIX=/usr/local

# Set the compiler's search/install paths.

# Directory for tinycc's own libraries (such as libtinyccrt-$ARCH.a)
# and headers (such as stdarg.h)
[ -z "$TINYCC_INSTALLDIR" ] && TINYCC_INSTALLDIR="$PREFIX"/tinycc
# Path to search for system #include files.
[ -z "$CC_HEADERPATH" ] && CC_HEADERPATH="/usr/include:/usr/local/include"
# Dynamic linker to put into generated executables.
[ -z "$CC_DYNAMIC_LINKER" ] && CC_DYNAMIC_LINKER="/lib/ld-linux.so.2"

# CC_LIBPATH is set in make/make.sh because it varies by target (such as
# building for i386 on an x86_64 host).  You can set CC_LIBPATH here if you
# want to, but then it won't vary by target because we don't know what the
# target _is_ yet.
#
# # Path to search for system libraries.
#
# [ -z "$CC_LIBPATH" ] && CC_LIBPATH="/usr/local/lib:/usr/lib:/lib"

# For ./configure -v display all the variables we just set.

if [ "$1" == "-v" ]
then
  for i in CC AR STRIP LIBSUF EXESUF CFLAGS LIBS HOST PREFIX TINYCC_INSTALLDIR CC_CRTDIR CC_LIBPATH CC_HEADERPATH TARGET
  do
    echo -n "$i="
    eval 'echo "$'$i'"'
  done
fi