Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
CMake
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2,681
Issues
2,681
List
Boards
Labels
Milestones
Merge Requests
17
Merge Requests
17
Packages
Packages
Container Registry
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
CMake
CMake
Commits
2cc36654
Commit
2cc36654
authored
Feb 14, 2002
by
Bill Hoffman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: do not use O2 g as default flags
parent
a12b5b95
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
208 additions
and
160 deletions
+208
-160
Templates/configure
Templates/configure
+150
-137
Templates/configure.in
Templates/configure.in
+13
-0
configure
configure
+34
-23
configure.in
configure.in
+11
-0
No files found.
Templates/configure
View file @
2cc36654
This diff is collapsed.
Click to expand it.
Templates/configure.in
View file @
2cc36654
...
...
@@ -7,8 +7,21 @@ AC_SUBST(CMAKE_CONFIG_DIR)
#
# check for some programs we use
#
# save the CFLAGS and CXXFLAGS specified by the user
save_CFLAGS=$CFLAGS
save_CXXFLAGS=$CXXFLAGS
AC_PROG_CC
AC_PROG_CXX
# restore the flags specified by the user and get rid of any flags
# found by autoconf (we do not want -02 -g by default)
CFLAGS=$save_CFLAGS
CXXFLAGS=$save_CXXFLAGS
AC_PROG_RANLIB
AC_PROG_INSTALL
...
...
configure
View file @
2cc36654
...
...
@@ -530,10 +530,16 @@ CMAKE_CONFIG_DIR=`pwd`
#
# check for some programs we use
#
# save the CFLAGS and CXXFLAGS specified by the user
save_CFLAGS
=
$CFLAGS
save_CXXFLAGS
=
$CXXFLAGS
# let autoconf find cc and CC, it will try to add -g -O2 to CFLAGS and CXXFLAGS
# Extract the first word of "gcc", so it can be a program name with args.
set
dummy gcc
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:5
37
: checking for
$ac_word
"
>
&5
echo
"configure:5
43
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_CC
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -563,7 +569,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set
dummy cc
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:5
67
: checking for
$ac_word
"
>
&5
echo
"configure:5
73
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_CC
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -614,7 +620,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set
dummy cl
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:6
18
: checking for
$ac_word
"
>
&5
echo
"configure:6
24
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_CC
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -646,7 +652,7 @@ fi
fi
echo
$ac_n
"checking whether the C compiler (
$CC
$CFLAGS
$LDFLAGS
) works""...
$ac_c
"
1>&6
echo
"configure:65
0
: checking whether the C compiler (
$CC
$CFLAGS
$LDFLAGS
) works"
>
&5
echo
"configure:65
6
: checking whether the C compiler (
$CC
$CFLAGS
$LDFLAGS
) works"
>
&5
ac_ext
=
c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
...
...
@@ -657,12 +663,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat
>
conftest.
$ac_ext
<<
EOF
#line 66
1
"configure"
#line 66
7
"configure"
#include "confdefs.h"
main(){return(0);}
EOF
if
{
(
eval echo
configure:6
66
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:6
72
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
ac_cv_prog_cc_works
=
yes
# If we can't run a trivial program, we are probably using a cross compiler.
if
(
./conftest
;
exit
)
2>/dev/null
;
then
...
...
@@ -688,12 +694,12 @@ if test $ac_cv_prog_cc_works = no; then
{
echo
"configure: error: installation or configuration problem: C compiler cannot create executables."
1>&2
;
exit
1
;
}
fi
echo
$ac_n
"checking whether the C compiler (
$CC
$CFLAGS
$LDFLAGS
) is a cross-compiler""...
$ac_c
"
1>&6
echo
"configure:69
2
: checking whether the C compiler (
$CC
$CFLAGS
$LDFLAGS
) is a cross-compiler"
>
&5
echo
"configure:69
8
: checking whether the C compiler (
$CC
$CFLAGS
$LDFLAGS
) is a cross-compiler"
>
&5
echo
"
$ac_t
""
$ac_cv_prog_cc_cross
"
1>&6
cross_compiling
=
$ac_cv_prog_cc_cross
echo
$ac_n
"checking whether we are using GNU C""...
$ac_c
"
1>&6
echo
"configure:
697
: checking whether we are using GNU C"
>
&5
echo
"configure:
703
: checking whether we are using GNU C"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_gcc
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -702,7 +708,7 @@ else
yes;
#endif
EOF
if
{
ac_try
=
'${CC-cc} -E conftest.c'
;
{
(
eval echo
configure:7
06
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
;
}
| egrep
yes
>
/dev/null 2>&1
;
then
if
{
ac_try
=
'${CC-cc} -E conftest.c'
;
{
(
eval echo
configure:7
12
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
;
}
| egrep
yes
>
/dev/null 2>&1
;
then
ac_cv_prog_gcc
=
yes
else
ac_cv_prog_gcc
=
no
...
...
@@ -721,7 +727,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS
=
"
$CFLAGS
"
CFLAGS
=
echo
$ac_n
"checking whether
${
CC
-cc
}
accepts -g""...
$ac_c
"
1>&6
echo
"configure:7
25
: checking whether
${
CC
-cc
}
accepts -g"
>
&5
echo
"configure:7
31
: checking whether
${
CC
-cc
}
accepts -g"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_cc_g
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -757,7 +763,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set
dummy
$ac_prog
;
ac_word
=
$2
echo
$ac_n
"checking for
$ac_word
""...
$ac_c
"
1>&6
echo
"configure:76
1
: checking for
$ac_word
"
>
&5
echo
"configure:76
7
: checking for
$ac_word
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_CXX
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -789,7 +795,7 @@ test -n "$CXX" || CXX="gcc"
echo
$ac_n
"checking whether the C++ compiler (
$CXX
$CXXFLAGS
$LDFLAGS
) works""...
$ac_c
"
1>&6
echo
"configure:79
3
: checking whether the C++ compiler (
$CXX
$CXXFLAGS
$LDFLAGS
) works"
>
&5
echo
"configure:79
9
: checking whether the C++ compiler (
$CXX
$CXXFLAGS
$LDFLAGS
) works"
>
&5
ac_ext
=
C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
...
...
@@ -800,12 +806,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat
>
conftest.
$ac_ext
<<
EOF
#line 8
04
"configure"
#line 8
10
"configure"
#include "confdefs.h"
int main(){return(0);}
EOF
if
{
(
eval echo
configure:8
09
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
if
{
(
eval echo
configure:8
15
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
${
ac_exeext
}
;
then
ac_cv_prog_cxx_works
=
yes
# If we can't run a trivial program, we are probably using a cross compiler.
if
(
./conftest
;
exit
)
2>/dev/null
;
then
...
...
@@ -831,12 +837,12 @@ if test $ac_cv_prog_cxx_works = no; then
{
echo
"configure: error: installation or configuration problem: C++ compiler cannot create executables."
1>&2
;
exit
1
;
}
fi
echo
$ac_n
"checking whether the C++ compiler (
$CXX
$CXXFLAGS
$LDFLAGS
) is a cross-compiler""...
$ac_c
"
1>&6
echo
"configure:8
35
: checking whether the C++ compiler (
$CXX
$CXXFLAGS
$LDFLAGS
) is a cross-compiler"
>
&5
echo
"configure:8
41
: checking whether the C++ compiler (
$CXX
$CXXFLAGS
$LDFLAGS
) is a cross-compiler"
>
&5
echo
"
$ac_t
""
$ac_cv_prog_cxx_cross
"
1>&6
cross_compiling
=
$ac_cv_prog_cxx_cross
echo
$ac_n
"checking whether we are using GNU C++""...
$ac_c
"
1>&6
echo
"configure:84
0
: checking whether we are using GNU C++"
>
&5
echo
"configure:84
6
: checking whether we are using GNU C++"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_gxx
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -845,7 +851,7 @@ else
yes;
#endif
EOF
if
{
ac_try
=
'${CXX-g++} -E conftest.C'
;
{
(
eval echo
configure:8
49
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
;
}
| egrep
yes
>
/dev/null 2>&1
;
then
if
{
ac_try
=
'${CXX-g++} -E conftest.C'
;
{
(
eval echo
configure:8
55
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
;
}
| egrep
yes
>
/dev/null 2>&1
;
then
ac_cv_prog_gxx
=
yes
else
ac_cv_prog_gxx
=
no
...
...
@@ -864,7 +870,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS
=
"
$CXXFLAGS
"
CXXFLAGS
=
echo
$ac_n
"checking whether
${
CXX
-g++
}
accepts -g""...
$ac_c
"
1>&6
echo
"configure:8
68
: checking whether
${
CXX
-g++
}
accepts -g"
>
&5
echo
"configure:8
74
: checking whether
${
CXX
-g++
}
accepts -g"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_prog_cxx_g
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -896,6 +902,11 @@ else
fi
# restore the flags specified by the user and get rid of any flags
# found by autoconf (we do not want -02 -g by default)
CFLAGS
=
$save_CFLAGS
CXXFLAGS
=
$save_CXXFLAGS
fullSrcDir
=
`
cd
$srcdir
;
pwd
`
CMAKE_ROOT_DIR
=
$fullSrcDir
...
...
@@ -906,7 +917,7 @@ CMAKE_ROOT_DIR=$fullSrcDir
# there are a few systems, like Next, where this doesn't work.
echo
$ac_n
"checking system version (for dynamic loading)""...
$ac_c
"
1>&6
echo
"configure:9
10
: checking system version (for dynamic loading)"
>
&5
echo
"configure:9
21
: checking system version (for dynamic loading)"
>
&5
if
test
-f
/usr/lib/NextStep/software_version
;
then
system
=
NEXTSTEP-
`
awk
'/3/,/3/'
/usr/lib/NextStep/software_version
`
else
...
...
@@ -961,7 +972,7 @@ fi
# ansi stream files (without the .h)
if test $ac_cv_prog_gxx = no; then
echo $ac_n "checking ansi standard C++ stream headers ""... $ac_c" 1>&6
echo "configure:9
65
: checking ansi standard C++ stream headers " >&5
echo "configure:9
76
: checking ansi standard C++ stream headers " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <iostream>
...
...
@@ -980,7 +991,7 @@ fi
# check to see if stl is in the std namespace
if test $ac_cv_prog_gxx = no; then
echo $ac_n "checking ansi standard namespace support ""... $ac_c" 1>&6
echo "configure:9
84
: checking ansi standard namespace support " >&5
echo "configure:9
95
: checking ansi standard namespace support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <list>
...
...
@@ -1000,7 +1011,7 @@ fi
# check to see if for scoping is supported
if test $ac_cv_prog_gxx = no; then
echo $ac_n "checking ansi for scope support ""... $ac_c" 1>&6
echo "configure:10
04
: checking ansi for scope support " >&5
echo "configure:10
15
: checking ansi for scope support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
void foo() { for(int i;;); for(int i;;); }
...
...
@@ -1022,7 +1033,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:10
26
: checking for $ac_word" >&5
echo "configure:10
37
: checking for $ac_word" >&5
if eval "test \"`echo '$''
{
'ac_cv_path_RUNMAKE'
+set
}
'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
...
...
configure.in
View file @
2cc36654
...
...
@@ -9,9 +9,20 @@ AC_SUBST(CMAKE_CONFIG_DIR)
#
# check for some programs we use
#
# save the CFLAGS and CXXFLAGS specified by the user
save_CFLAGS=$CFLAGS
save_CXXFLAGS=$CXXFLAGS
# let autoconf find cc and CC, it will try to add -g -O2 to CFLAGS and CXXFLAGS
AC_PROG_CC
AC_PROG_CXX
# restore the flags specified by the user and get rid of any flags
# found by autoconf (we do not want -02 -g by default)
CFLAGS=$save_CFLAGS
CXXFLAGS=$save_CXXFLAGS
fullSrcDir=`cd $srcdir; pwd`
CMAKE_ROOT_DIR=$fullSrcDir
AC_SUBST(CMAKE_ROOT_DIR)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment