source: git/ntl/configure @ 6ce030f

spielwiese
Last change on this file since 6ce030f was ef358a, checked in by Hans Schoenemann <hannes@…>, 13 years ago
do not asumme gcc if CC/CXX is given git-svn-id: file:///usr/local/Singular/svn/trunk@14154 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100755
File size: 2.1 KB
Line 
1#!/bin/sh
2# version $Id$
3
4while [ $# -ne 0 ]; do
5   case $1 in
6     --prefix=*)
7         prefix=`echo $1 | sed 's/--prefix=//'` ;
8         ;;
9     --prefix)
10         shift;
11         prefix="$1";
12         ;;
13     --libdir=*)
14         libdir=`echo $1 | sed 's/--libdir=//'` ;
15         ;;
16     --libdir)
17         shift;
18         libdir="$1";
19         ;;
20     --includedir=*)
21         includedir=`echo $1 | sed 's/--includedir=//'` ;
22         ;;
23     --includedir)
24         shift;
25         includedir="$1";
26         ;;
27     *)
28         : ignore all other options
29         ;;
30  esac;
31  shift;
32done
33
34if test -r ../config.cache; then
35  . ../config.cache
36fi
37
38if test set${ac_cv_singuname} = set; then
39  :
40else
41  ac_cv_singuname="unknown"
42  if test -r "../singuname.sh"; then
43    if (/bin/sh ../singuname.sh >/dev/null 2>&1) then
44      ac_cv_singuname=`/bin/sh ../singuname.sh`
45    fi
46  fi
47fi
48
49if test "x$SING_CC" = x
50then
51  SING_CC=gcc
52  if test "x$CFLAGS" = x
53  then
54    CFLAGS="-O2 -fomit-frame-pointer"
55  fi
56else
57  if test "x$CFLAGS" = x
58  then
59    CFLAGS="-O2"
60  fi
61fi
62
63if test "x$SING_CXX" = x
64then
65  SING_CXX=g++
66  if test "x$CXXFLAGS" = x
67  then
68    if test x$ac_cv_cxx_have_exception = xyes
69    then
70      CXXFLAGS="-O2 -fomit-frame-pointer -fno-rtti -fno-exceptions"
71    else
72      CXXFLAGS="-O2 -fomit-frame-pointer -fno-rtti"
73    fi
74  fi
75else
76  if test "x$CXXFLAGS" = x
77  then
78    if test x$ac_cv_cxx_have_exception = xyes
79    then
80      CXXFLAGS="-O2 -fomit-frame-pointer -fno-rtti -fno-exceptions"
81    else
82      CXXFLAGS="-O2"
83    fi
84  fi
85fi
86
87if test x$ac_cv_header_iostream = xyes
88then
89  NTL_STD_CXX=on
90else
91  NTL_STD_CXX=off
92fi
93
94CFLAGS="$CPPFLAGS $CFLAGS"
95CXXFLAGS="$CPPFLAGS $CXXFLAGS"
96DOCDIR=`pwd`/../doc
97echo "#!/bin/sh" >config.status
98echo "cd src" >>config.status
99echo ./configure CC=\"$SING_CC\" CXX=\"$SING_CXX\" LIBDIR=$libdir INCLUDEDIR=$includedir PREFIX=$prefix NTL_GMP_LIP=on GMP_PREFIX=$prefix/${ac_cv_singuname} CFLAGS=\"$CFLAGS\" CXXFLAGS=\"$CXXFLAGS\" LDFLAGS=\"$LDFLAGS\" NTL_STD_CXX=$NTL_STD_CXX DOCDIR=\"$DOCDIR\" >>config.status
100echo "cd .." >>config.status
101
102chmod +rx config.status
103
104. ./config.status
Note: See TracBrowser for help on using the repository browser.