2007-01-29 10:07:10 +00:00
|
|
|
#!/bin/sh
|
2012-02-04 03:45:24 +00:00
|
|
|
|
|
|
|
# Run this to generate all the initial makefiles, etc.
|
|
|
|
|
2007-01-29 10:07:10 +00:00
|
|
|
# Taken from glib CVS
|
|
|
|
|
|
|
|
# Change the following to match the versions installed on your system
|
2009-04-29 18:31:30 +00:00
|
|
|
LIBTOOLIZE=libtoolize
|
2012-10-10 02:13:56 +00:00
|
|
|
AUTORECONF=autoreconf
|
2007-01-29 10:07:10 +00:00
|
|
|
AUTOMAKE=automake
|
|
|
|
|
2016-05-09 00:15:36 +00:00
|
|
|
# Check if we compile on OSX and resolve the name conflict with
|
|
|
|
# Apple's tool for creating Mach-O dynamic libraries.
|
|
|
|
|
2020-05-22 12:36:24 +00:00
|
|
|
case $(uname) in Darwin*) LIBTOOLIZE=glibtoolize ;; esac
|
2016-05-09 00:15:36 +00:00
|
|
|
|
2012-09-25 19:40:42 +00:00
|
|
|
# variables below this line should not need modification
|
2020-05-22 12:36:24 +00:00
|
|
|
SRCDIR=$(dirname "$0")
|
2012-09-25 19:40:42 +00:00
|
|
|
test -z "$SRCDIR" && SRCDIR=.
|
2007-01-29 10:07:10 +00:00
|
|
|
|
2020-05-22 12:36:24 +00:00
|
|
|
ORIGDIR=$(pwd)
|
2012-09-25 19:40:42 +00:00
|
|
|
|
2007-01-29 10:07:10 +00:00
|
|
|
PROJECT=hamlib
|
2012-09-25 19:40:42 +00:00
|
|
|
|
2007-01-29 10:07:10 +00:00
|
|
|
TEST_TYPE=-f
|
|
|
|
FILE=include/hamlib/rig.h
|
|
|
|
|
|
|
|
DIE=0
|
|
|
|
|
2016-03-11 16:19:03 +00:00
|
|
|
("$AUTORECONF" --version) > /dev/null 2>&1 || {
|
2007-01-29 10:07:10 +00:00
|
|
|
echo
|
2012-10-10 02:13:56 +00:00
|
|
|
echo "You must have autoreconf installed to compile $PROJECT."
|
2007-01-29 10:07:10 +00:00
|
|
|
echo "Download the appropriate package for your distribution,"
|
|
|
|
DIE=1
|
|
|
|
}
|
|
|
|
|
2016-03-11 16:19:03 +00:00
|
|
|
("$AUTOMAKE" --version) > /dev/null 2>&1 || {
|
2007-01-29 10:07:10 +00:00
|
|
|
echo
|
|
|
|
echo "You must have automake installed to compile $PROJECT."
|
2012-02-04 03:45:24 +00:00
|
|
|
echo "Download the appropriate package for your distribution,"
|
2007-01-29 10:07:10 +00:00
|
|
|
DIE=1
|
|
|
|
}
|
|
|
|
|
2016-03-11 16:19:03 +00:00
|
|
|
("$LIBTOOLIZE" --version) > /dev/null 2>&1 || {
|
2009-06-01 17:05:52 +00:00
|
|
|
echo
|
2010-03-01 18:43:38 +00:00
|
|
|
echo "You must have libtool installed to compile $PROJECT."
|
|
|
|
echo "Download the appropriate package for your distribution."
|
2009-06-01 17:05:52 +00:00
|
|
|
DIE=1
|
|
|
|
}
|
|
|
|
|
2007-01-29 10:07:10 +00:00
|
|
|
if test "$DIE" -eq 1; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-06-25 09:25:39 +00:00
|
|
|
cd "$SRCDIR"
|
2012-09-25 19:40:42 +00:00
|
|
|
|
2007-01-29 10:07:10 +00:00
|
|
|
test $TEST_TYPE $FILE || {
|
|
|
|
echo "You must run this script in the top-level $PROJECT directory"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2012-02-04 03:45:24 +00:00
|
|
|
###################################################################
|
|
|
|
### autoreconf is now the preferred way to process configure.ac ###
|
|
|
|
### which should handle compiler variations and ensures that ###
|
|
|
|
### subtools are processed in the correct order. ###
|
|
|
|
###################################################################
|
2007-01-29 10:07:10 +00:00
|
|
|
|
2012-10-14 00:09:46 +00:00
|
|
|
echo "Running '$AUTORECONF -i' to process configure.ac"
|
2012-02-04 03:45:24 +00:00
|
|
|
echo "and generate the configure script."
|
2007-01-29 10:07:10 +00:00
|
|
|
|
2012-10-14 00:09:46 +00:00
|
|
|
# Tell autoreconf to install needed build system files
|
2015-06-25 09:25:39 +00:00
|
|
|
"$AUTORECONF" -i
|
2007-01-29 10:07:10 +00:00
|
|
|
|
2015-06-25 09:25:39 +00:00
|
|
|
cd "$ORIGDIR"
|