Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sander, Oliver
dune-gfe
Commits
676b1dfd
Commit
676b1dfd
authored
18 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
updated
[[Imported from SVN: r1035]]
parent
518f64d6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
autogen.sh
+65
-112
65 additions, 112 deletions
autogen.sh
with
65 additions
and
112 deletions
autogen.sh
+
65
−
112
View file @
676b1dfd
#!/bin/sh
#
$Id
$
#
: duneproject 4749 2006-10-19 16:31:22Z christi
$
###
# barf on errors
# barf on errors
set
-e
# may be used to force a certain automake-version e.g. 1.7
AMVERS
=
1.8
# everybody who checks out the CVS wants the maintainer-mode to be enabled
# (should be off for source distributions, this should happen automatically)
#
DEFAULTCONFOPT
=
"--enable-maintainer-mode"
# default values
DEBUG
=
1
OPTIM
=
0
usage
()
{
echo
"Usage: ./autogen.sh [options]"
echo
" -i, --intel use intel compiler"
echo
" -g, --gnu use gnu compiler (default)"
echo
" --opts=FILE use compiler-options from FILE"
echo
" -d, --debug switch debug-opts on"
echo
" -n, --nodebug switch debug-opts off"
echo
" -o, --optim switch optimization on"
echo
" --with-dune=PATH directory with dune/ inside"
echo
" -h, --help you already found this :)"
echo
echo
"Parameters not in the list above are directly passed to configure. See"
echo
echo
" ./configure --help"
echo
echo
"for a list of additional options"
echo
" --ac=, --acversion=VERSION use a specific VERSION of autoconf"
echo
" --am=, --amversion=VERSION use a specific VERSION of automake"
echo
" -h, --help you already found this :-)"
}
# no compiler set yet
COMPSET
=
0
for
OPT
in
$*
;
do
for
OPT
in
"
$@
"
;
do
set
+e
# stolen from configure...
# when no option is set, this returns an error code
...
...
@@ -45,104 +19,83 @@ for OPT in $* ; do
set
-e
case
"
$OPT
"
in
-
i
|
--intel
)
.
./icc.opts
;
COMPSET
=
1
;;
-g
|
--gnu
)
.
./gcc.opts
;
COMPSET
=
1
;;
--opts
=
*
)
if
[
-r
$arg
]
;
then
echo
"reading options from
$arg
..."
.
./
$arg
;
COMPSET
=
1
;
else
echo
"Cannot open compiler options file
$arg
!
"
;
exit
1
;
fi
;
;
-d
|
--debug
)
DEBUG
=
1
;;
-n
|
--nodebug
)
DEBUG
=
0
;;
-o
|
--optim
)
OPTIM
=
1
;;
-
-ac
=
*
|
--acversion
=
*
)
if
test
"x
$arg
"
=
"x"
;
then
usage
;
exit
1
;
fi
ACVERSION
=
$arg
;
;
--am
=
*
|
--amversion
=
*
)
if
test
"x
$arg
"
=
"x"
;
then
usage
;
exit
1
;
fi
AMVERSION
=
$arg
;;
-h
|
--help
)
usage
;
exit
0
;;
# special hack: use the with-dune-dir for aclocal-includes
--with-dune
=
*
)
eval
DUNEDIR
=
$arg
# add the option anyway
CONFOPT
=
"
$CONFOPT
$OPT
"
;;
# pass unknown opts to ./configure
*
)
CONFOPT
=
"
$CONFOPT
$OPT
"
;;
*
)
if
test
-d
"
$OPT
/m4"
;
then
ACLOCAL_FLAGS
=
"
$ACLOCAL_FLAGS
-I
$OPT
/m4"
fi
if
test
-d
"/share/aclocal"
;
then
ACLOCAL_FLAGS
=
" -I /share/aclocal"
fi
if
test
-d
"
$OPT
/am"
;
then
am_dir
=
"
$OPT
/am"
fi
;;
esac
done
# set special m4-path if --with-dune is set
if
[
x
$DUNEDIR
!=
x
]
;
then
# aclocal from automake 1.8 seems to need an absolute path for inclusion
FULLDIR
=
`
cd
$DUNEDIR
&&
pwd
`
# automagically use directory above if complete Dune-dir was supplied
if
test
`
basename
$FULLDIR
`
=
"dune"
;
then
FULLDIR
=
`
cd
$FULLDIR
/..
&&
pwd
`
fi
ACLOCALOPT
=
"-I
$FULLDIR
/dune/m4/"
## report parameters
if
test
"x
$ACVERSION
"
!=
"x"
;
then
echo
"Forcing autoconf version
$ACVERSION
"
if
!
which autoconf
$ACVERSION
>
/dev/null
;
then
echo
echo
"Error: Could not find autoconf
$ACVERSION
"
echo
" Did you specify a wrong version?"
exit
1
fi
fi
# use the free compiler as default :-)
if
[
"
$COMPSET
"
!=
"1"
]
;
then
echo
"No compiler set, using GNU compiler as default"
.
./gcc.opts
if
test
"x
$AMVERSION
"
!=
"x"
;
then
echo
"Forcing automake version
$AMVERSION
"
if
!
which automake
$AMVERSION
>
/dev/null
;
then
echo
echo
"Error: Could not find automake
$AMVERSION
"
echo
" Did you specify a wrong version?"
exit
1
fi
fi
# create flags
COMPFLAGS
=
"
$FLAGS
"
# maybe add debug flag
if
[
"
$DEBUG
"
=
"1"
]
;
then
COMPFLAGS
=
"
$COMPFLAGS
$DEBUGFLAGS
"
fi
# maybe add optimization flag
if
[
"
$OPTIM
"
=
"1"
]
;
then
COMPFLAGS
=
"
$COMPFLAGS
$OPTIMFLAGS
"
fi
# check if automake-version was set
if
test
"x
$AMVERS
"
!=
x
;
then
echo
Warning: explicitly using automake version
$AMVERS
# binaries are called automake-$AMVERS
AMVERS
=
"-
$AMVERS
"
fi
#### create all autotools-files
## run autotools
echo
"--> libtoolize..."
#
force to write new versions of files, otherwise upgrading libtools
#
doesn't do anything...
#
this script won't rewrite the files if they already exist. This is a
#
PITA when you want to upgrade libtool, thus I'm setting --force
libtoolize
--force
# prepare everything
echo
"--> aclocal..."
aclocal
$AMVERS
$ACLOCALOPT
# sanity check to catch missing --with-dune
if
!
grep
DUNE aclocal.m4
>
/dev/null
;
then
echo
"aclocal.m4 doesn't contain any DUNE-macros, this would crash autoconf"
echo
"or automake later. Maybe you should provide a --with-dune=PATH parameter"
exit
1
fi
aclocal
$AMVERSION
$ACLOCAL_FLAGS
# applications should provide a config.h for now
echo
"--> autoheader..."
autoheader
autoheader
$ACVERSION
# create a link to the dune-common am directory
echo
"--> linking dune-common/am..."
rm
-f
am
ln
-s
$am_dir
am
# call automake/conf
echo
"--> automake..."
automake
$AMVERS
--add-missing
automake
$AMVERS
ION
--add-missing
echo
"--> autoconf..."
autoconf
#### start configure with special environment
export
CC
=
"
$COMP
"
export
CXX
=
"
$CXXCOMP
"
export
CPP
=
"
$COMP
-E"
export
CFLAGS
=
"
$COMPFLAGS
"
export
CXXFLAGS
=
"
$COMPFLAGS
"
autoconf
$ACVERSION
#./configure $DEFAULTCONFOPT $CONFOPT
## tell the user what to do next
echo
"Now run ./configure "
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment