-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathautogen.sh
More file actions
executable file
·46 lines (43 loc) · 1.67 KB
/
autogen.sh
File metadata and controls
executable file
·46 lines (43 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#Autotools includes two Core Packages: GNU Autoconf and GNU Automake
#GNU Autoconf include the following tools
# autoconf: Creates configure from configure.ac
# autoheader: Creates config.h.in from configure.ac
# autoreconf: Run all tools in the right order
# autoscan: Scan sources for common portability problems and related macros missing from configure.ac
# autoupdate: Update obsolete macros in configure.ac
# ifnames: Gather identifiers from all #if/#ifdef/... directives
# autom4te: The heart of Autoconf. It drives M4 and implements the features used by most of the above tools.
#GNU Automake includes the following tools
# automake: Create Makefile.in from Makefile.am and configure.ac
# aclocal: Scan configure.ac for uses of third-party macros and gather definitions in aclocal.m4
#GNU M4 is the real macro processor.
#Use autoreconf to setup the package initially
if ! which autoreconf; then
read -p "Required packages are not installed, would like to install them? (Y/n):" ans
if [ "$ans" = "" -o "$ans" = "Y" -o "$ans" = "y" ]; then
common="autoconf automake libtool make cmake"
case "`uname`" in
Linux)
if which apt; then
sudo apt install $common gcc git tar bzip2 libfftw3-dev liblapack3 libcmocka-dev
elif which dnf; then
sudo dnf install $common gcc git tar bzip2 fftw-devel lapack libcmocka-devel
else
echo "System: Linux. Not sure how to install the packages."
fi
;;
Darwin)
if which brew; then
brew install $common
elif which port; then
sudo port install $common
else
echo "System: macOS. Not sure how to install the packages."
fi
;;
*)
echo "Unknown system: `uname`"
esac
fi
fi
autoreconf -i