-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure-compiler.ac
More file actions
43 lines (37 loc) · 936 Bytes
/
configure-compiler.ac
File metadata and controls
43 lines (37 loc) · 936 Bytes
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
if test -z "$CXXFLAGS"; then
DEFCXXFLAGS=
else
DEFCXXFLAGS=$CXXFLAGS
fi
DEFMTFLAGS=
DEFOPTFLAGS="-O2"
AC_PROG_CXX
AC_LANG([C++])
if test x$ac_cv_cxx_compiler_gnu = xyes; then
if test -z "$SSEFLAGS"; then
SSEFLAGS="-msse3 -mfpmath=sse"
fi
AC_DEFINE(HAVE_ISFINITE)
CXXFLAGS="$DEFCXXFLAGS -Wall -Wno-sign-compare"
AC_CANONICAL_HOST
case $host_os in
*cygwin* ) CPPFLAGS="$CPPFLAGS -mno-cygwin";;
esac
fi
if test -z "$MTFLAGS"; then
MTFLAGS=$DEFMTFLAGS
fi
AC_ARG_WITH(sse,
AS_HELP_STRING([--with-sse],[enable use of SSE3 instructions for complex arithmetic (default=no)]),,with_sse=no)
if test x$with_sse = xyes; then
if test -z "$SSEFLAGS"; then
AC_MSG_FAILURE([--with-sse specified, but don't know how to enable SSE3 for compiler (set SSEFLAGS)])
else
CPPFLAGS="$CPPFLAGS $SSEFLAGS"
AC_DEFINE(LCM_USE_SSECOMPLEX)
AC_DEFINE(LCM_NEED_128BIT_ALIGN)
fi
fi
if test -z "$OPTFLAGS"; then
OPTFLAGS=$DEFOPTFLAGS
fi