-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
68 lines (63 loc) · 2.16 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
AC_INIT([BeatBox],[1.16],[[email protected]])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([-Wall gnu])
myhost=`uname -n`
case $myhost in
hector*)
LIBS=" -lm -lX11 -lxcb -lxcb-xlib -ldl -lXau";;
*)
;;
esac
myos=`uname`
case $myos in
Darwin*)
LIBS="-L/opt/X11/lib"
CFLAGS="$CFLAGS -I/opt/X11/include"
;;
*)
;;
esac
# Checks for graphics libraries
AC_SEARCH_LIBS(XOpenDisplay,
[X11],
[AC_SUBST(X11_AVAIL,yes)],
[AC_MSG_WARN([X11 libraries not found, Beatbox will be built without graphical displays. If you need graphical displays you will need to configure Beatbox with X11, please contact the Beatbox developers for further information.])
AC_SUBST(X11_AVAIL,no)],
[])
if test "x$X11_AVAIL" = "xno"; then
AC_SUBST(GL_AVAIL,no)
else
AC_SEARCH_LIBS(glXQueryExtension,
[GL],
[AC_SUBST(GL_AVAIL,yes)],
[AC_MSG_WARN([OpenGL libraries not found, Beatbox will be built without GL graphical extention. If you need graphical displays you will need to configure Beatbox with OpenGL please contact the Beatbox developers for further information.])
AC_SUBST(GL_AVAIL,no)],
[])
fi
AC_SEARCH_LIBS(pow, [m], [], [])
AC_PROG_CC(mpicc gcc cl cc)
AM_PROG_CC_C_O
AC_CONFIG_HEADERS([config.h])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "mpi.h"]], [[MPI_Init(0, 0);]])],[mpi_link="yes"],[mpi_link="no"])
AC_CONFIG_FILES([
Makefile
src/Makefile
])
if test "x$X11_AVAIL" = "xno"; then
echo "***************"
echo "Reminder: X11 libraries not found so the graphical part of Beatbox is not being built. If you want graphical display then please contact the Beatbox developers for help building with X11 libraries."
echo "***************"
CFLAGS="$CFLAGS -D NOX11"
else
CFLAGS="$CFLAGS -D X11"
fi
if test "$GL_AVAIL" = "no"; then
echo "***************"
echo "Reminder: OpenGL libraries not found, Beatbox will be built without GL graphical extention. If you need graphical displays you will need to configure Beatbox with X11, please contact the Beatbox developers for further information."
echo "***************"
CFLAGS="$CFLAGS -D NOGL"
else
CFLAGS="$CFLAGS -D GL"
fi
AC_CONFIG_SUBDIRS([src/gsl-1.16.extract])
AC_OUTPUT