-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
56 lines (47 loc) · 1.27 KB
/
configure.ac
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
47
48
49
50
51
52
53
54
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT([MGMRootClass], [1.0], [[email protected]])
#AC_CONFIG_SRCDIR([MGMRisetimeInfo.hh])
AC_PROG_CXX()
AC_SUBST(CXX)
SOFLAGS="-shared"
MGDOLIBEXTSHARED=so
MYHOST=`uname`
case "${MYHOST}" in
Darwin*)
LDFLAGS="-bind_at_load $LDFLAGS"
SOFLAGS="-dynamiclib"
MGDOLIBEXTSHARED=dylib
esac
host_cpu=`uname -m`
case "${host_cpu}" in
x86_64*)
CXXFLAGS="$CXXFLAGS -fPIC"
echo "Compiling on an x86_64 chipset...Setting -fPIC flag."
esac
#Find root
echo ""
echo "${BOLD}Checking for ROOT: ${OFFBOLD} "
m4_include(root.m4)
ROOT_PATH(5.20,, AC_MSG_ERROR(ROOT not found!))
CWD=`pwd`
THISSRCDIR=`basename $CWD`
AC_SUBST(CWD)
AC_SUBST(CXXFLAGS)
AC_SUBST(THISSRCDIR)
AC_SUBST(SOFLAGS)
AC_SUBST(MGDOLIBEXTSHARED)
AC_CONFIG_FILES([
LoadMGMClasses.C
buildTools/config.mk
])
AC_OUTPUT
echo
echo "**********************************************************************************"
echo "**********************************************************************************"
echo
echo "You have successfully configured $PACKAGE_NAME. Please now compile by issuing the command:"
echo
echo " make"
echo