File: configure.ac

package info (click to toggle)
cufflinks 2.2.1%2Bdfsg.1-3
  • links: PTS, VCS
  • area: non-free
  • in suites: buster
  • size: 4,320 kB
  • sloc: cpp: 57,165; ansic: 12,297; python: 517; makefile: 241; sh: 59
file content (145 lines) | stat: -rwxr-xr-x 4,271 bytes parent folder | download | duplicates (5)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
m4_include([ax_boost_base.m4])
m4_include([ax_boost_thread.m4])
m4_include([ax_boost_system.m4])
m4_include([ax_boost_serialization.m4])
m4_include([ax_bam.m4])
m4_include([ax_check_zlib.m4])
m4_include([ax_check_eigen.m4])

define([svnversion], esyscmd([sh -c "svnversion|tr -d '\n'"]))dnl
AC_INIT([cufflinks], [2.2.1], [cole@cs.umd.edu])
AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision])

AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE

#AM_PATH_CPPUNIT(1.10.2)

AC_ARG_VAR(PYTHON, [python program])

 # Make sure CXXFLAGS is defined so that AC_PROG_CXX doesn't set it.
CXXFLAGS="$CXXFLAGS"
CFLAGS="$CFLAGS"

AC_LANG(C)

# Checks for programs.
AC_PROG_AWK
AC_PROG_CXX
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_INSTALL
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AM_PATH_PYTHON([2.4])
AX_BOOST_BASE([1.47.0])
AX_BAM
AX_BOOST_SYSTEM
AX_BOOST_SERIALIZATION
AX_BOOST_THREAD
AX_CHECK_ZLIB()
AX_EIGEN
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_CHECK_TYPES([ptrdiff_t])


# Checks for library functions.
#AC_FUNC_FORK
#AC_CHECK_FUNCS([floor memmove pow regcomp sqrt strchr strcspn strspn strstr])

# check the platform
AC_CANONICAL_HOST

# set CFLAGS and CXXFLAGS
user_CFLAGS=${CFLAGS}
generic_CFLAGS="-Wall -Wno-strict-aliasing -g -gdwarf-2 -Wunused -Wuninitialized -ftemplate-depth-1024"
ext_CFLAGS=""
debug_CFLAGS=""
#echo "${host_cpu}-${host_os}"
case "${host_cpu}-${host_os}" in
  i*86-*linux*)
	    ext_CFLAGS="-march=i686";;
  i*86-darwin*)
	CFLAGS="-m64"
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [ext_CFLAGS="-arch x86_64"], []);;
esac

AC_ARG_ENABLE(vectorize,    [  --enable-vectorize        Enable GCC auto-vectorization],
			  [ext_CFLAGS="${ext_CFLAGS} -ftree-vectorize -msse3 -ffast-math -ftree-vectorizer-verbose=99"], [])

AC_ARG_ENABLE(intel64,      [  --enable-intel64        optimize for Intel64 CPU such as Xeon and Core2],
			  [ext_CFLAGS="${ext_CFLAGS} -march=nocona"], [])

AC_ARG_ENABLE([debug],
              [AS_HELP_STRING([--enable-debug],
	                      [enable debugging info (default is no)])],
              [], [enable_debug=no])

			  
AC_ARG_ENABLE([optim],
              [AS_HELP_STRING([--enable-optim@<:@=0|1|2|3@:>@],
	                      [set optimization level (default is 3)])],
              [if test "x$enable_optim" = xyes; then enable_optim=3; fi],
              [enable_optim=3])

AS_IF([test "x$enable_optim" != xno], [ext_CFLAGS="$ext_CFLAGS -O$enable_optim"])	

AS_IF([test "x$enable_debug" = xyes],
      [debug_CFLAGS="-DDEBUG"],
      [debug_CFLAGS="-DNDEBUG"])
	  
AC_ARG_ENABLE(profiling,      [  --enable-profiling        enable profiling with google-perftools],
	  [ext_LDFLAGS="-lprofiler -ltcmalloc"], [])
	  
CFLAGS="${generic_CFLAGS} ${ext_CFLAGS} ${user_CFLAGS} ${debug_CFLAGS} ${OPENMP_CFLAGS}"
CXXFLAGS="$CFLAGS"
CXXFLAGS="${CXXFLAGS} ${BOOST_CPPFLAGS} ${BAM_CPPFLAGS} ${EIGEN_CPPFLAGS}"
user_LDFLAGS="$LDFLAGS"
LDFLAGS="${ext_LDFLAGS} ${user_LDFLAGS}"

# Checks for structures/functions that can be used to determine system memory
AC_CHECK_MEMBERS([struct sysinfo.totalram], [], [], [#include <sys/sysinfo.h>])
AC_CHECK_DECLS([sysctl, CTL_HW, HW_PHYSMEM], [], [], [#include <sys/sysctl.h>])

AM_INIT_AUTOMAKE([-Wall tar-pax foreign])

AC_CONFIG_FILES([Makefile				 
				 src/Makefile])

AC_OUTPUT
# dump some configuration confirmations
echo \
"
-- ${PACKAGE_STRING} Configuration Results --
  C++ compiler:        ${CXX} ${CXXFLAGS} ${LDFLAGS}"

if test x"${GCC}" = x"yes" ; then
   gcc_version=`${CC} --version | head -n 1`
   echo "  GCC version:         ${gcc_version}"
else
   gcc_version=''
fi

echo \
"  Host System type:    ${host}
  Install prefix:      ${prefix}
  Install eprefix:     ${exec_prefix}

  See config.h for further configuration information.
  Email <${PACKAGE_BUGREPORT}> with questions and bug reports.
"

if test x"${PYTHON}" = x":"  ||  ! test -x "${PYTHON}"; then
    echo "WARNING! python was not found and is required to run some utility scripts"
    echo "  We recommend installing python and pointing configure to the installed location"
fi