TOP=`pwd`
MAKE=${MAKE:-make}
config_dir=config
data_dir=data
doc_dir=doc
examples_dir=examples
misc_dir=misc
src_dir=src
desc_dir=src/desc
case "$RUNTEST" in /*);; */*) RUNTEST="$TOP/$RUNTEST";; esac
cd $config_dir
. ./get_head . ./version
echo "Configuring pari-$pari_release_verbose $patchlevel_verbose"
command_line0="$0 $@"
. ./get_config_options
. ./get_nl . ./get_PATH
echo Looking for some tools first ...
_tools_list='gzip cc gcc ld perl zcat'
pathspace=`echo $PATH | sed -e "s/$dir_sep/ /g" | sed -e 's,\\\\,/,g'`
for file in $_tools_list; do
x=`./locate $file '' $pathspace`
eval $file=$x
case $x in
?:/*|/*) echo ..."$file is $x";;
*) echo ..."I could not find $file." >&2;;
esac
done
if test -z "$zcat" -a -n "$gzip"; then zcat="$gzip -dc"; fi
. ./get_archos config_log="$TOP/config-$arch-$osname$$.log"
cat > $config_log<< EOT
This file contains messages produced while configuring
pari-$pari_release $patchlevel_verbose
to aid debugging if Configure makes a mistake. Command line was
> $command_line0
EOT
exec 5>> $config_log
. ./get_cc
. ./get_mt
. ./get_double_format
. ./get_kernel
. ./get_dlcflags
. ./get_ld
. ./get_dlld
. ./get_perl
. ./get_libc echo Checking for optional libraries and headers...
if test "$kernlvl1" = "gmp"; then
. ./get_gmp
fi
. ./get_graphic_lib
case "$without_readline" in
yes);;
*) . ./get_readline
esac
case $kernlvl1 in
gmp) libpari_base=pari-gmp;;
none) libpari_base=pari;;
esac
case $enable_tls in
yes) libpari_base="${libpari_base}-tls"
esac
if test `expr $VersionMinor % 2` = 0; then
libpari_base=$libpari_base-$version
fi
. ./get_install . ./get_objdir . ./get_static runpath=\"$libdir\"
LDDYN="-lpari"
. ./get_modld
case "$osname" in
os2) ln_s=cp; make_sh=sh;;
*) ln_s="ln -s"; make_sh="/bin/sh";;
esac
rm -f gmon.out rm -f *.gcno *.gcda . ./get_tests cat << EOT
==========================================================================
EOT
cd "$TOP"
if test ! -d $objdir; then mkdir -p $objdir; fi
rm -f $objdir/config.log; mv $config_log $objdir/config.log
dflt_conf_file=$objdir/$dflt_conf_file
cat > $dflt_conf_file << EOT
# Config file for Pari $release -- $pretty
EOT
case "$osname" in
os2|mingw) shell_q='"'; echo "shell_q='\"'" >> $dflt_conf_file;;
*) shell_q="'"; echo "shell_q=\"'\"" >> $dflt_conf_file;;
esac
for variable in\
pari_release pari_release_verbose version libpari_base static objdir\
arch asmarch osname pretty\
kernlvl0 kernlvl1 RT_LIBS DL_LIBS MT_LIBS LIBS\
dir_sep runpath runpathprefix LDDYN RUNTEST\
ln_s make_sh\
sizeof_long doubleformat\
thread_engine enable_tls\
runtime_perl\
$_tools_list\
$_test_list\
$_install_list\
$_perl_list\
$_cc_list\
$_ld_list\
$_dl_list\
$_dlld_list\
$_graphic_list\
$_modld_list\
$_readline_list\
$_gmp_list\
$_has_list; do
eval "echo $variable=\'"'$'"$variable\'" \>\> $dflt_conf_file
done
. $config_dir/extract_files
cat << EOT
==========================================================================
EOT
if test -n "$tune"; then
echo "Building and tuning PARI (this may take a while)"
echo
(cd $objdir; rm -f parilvl1.h pariinl.h;\
$MAKE tune && tune -t > tune.h.new && mv tune.h.new tune.h && cat tune.h\
&& rm -f parilvl1.h pariinl.h && $MAKE gp)
else
echo $n "Shall we try to build pari $version.$patch ($status) now (y/n)? $c"
dflt=n; rep='y n'; . $config_dir/myread
fi
mkobjdir=`$config_dir/objdir`
cdobjdir=
if test "$objdir" != "$mkobjdir"; then
cdobjdir="cd $objdir; "
fi
case $ans in
y) if (cd $objdir; $MAKE gp); then
echo $n "Shall we install the files where they belong (y/n)? $c"
dflt=n; rep='y n'; . $config_dir/myread
case $ans in
y) $MAKE install;;
n) echo "Ok. Type \"${cdobjdir}make install\" when you are ready";;
esac
fi;;
n) echo "Ok. Type \"${cdobjdir}make install\" when you are ready";;
esac
echo 'Bye !'