source: branches/profile/GDE/PHYML20130708/phyml/configure.ac

Last change on this file was 10307, checked in by aboeckma, 11 years ago

added most recent version of phyml

File size: 6.1 KB
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_INIT([PhyML],esyscmd([sh -c "date \"+%Y%m%d\" | tr -d '\n'"]),[s.guindon@auckland.ac.nz])
5AM_INIT_AUTOMAKE([foreign])
6m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
7
8AC_CONFIG_SRCDIR([src/simu.c],[doc/phyml-manual.tex])
9AC_CONFIG_HEADERS([config.h])
10
11AC_DEFINE([UNIX],[1],[Unix tag on])
12AC_DEFINE([DEBUG],[1],[Debug tag on])
13
14AM_INIT_AUTOMAKE
15AC_CANONICAL_HOST
16
17AC_PROG_CC([gcc])
18
19# Checks for libraries.
20AC_CHECK_LIB([m], [log])
21
22# Checks for header files.
23AC_HEADER_STDC
24AC_CHECK_HEADERS([float.h stdlib.h string.h unistd.h])
25
26# Checks for typedefs, structures, and compiler characteristics.
27AC_C_CONST
28AC_C_INLINE
29AC_TYPE_SIZE_T
30
31# Check for presence of LaTeX and pdfLaTeX
32AC_CHECK_PROGS([PDFLATEX], pdflatex, [/bin/false])
33AC_CHECK_PROGS([LATEX], latex, [/bin/false])
34if test "x$PDFLATEX" = x/bin/false || test "x$LATEX" = x/bin/false; then
35 enable_docs=no
36AC_MSG_WARN([Documentation will not be built!])
37fi
38
39AM_CONDITIONAL([HAVE_PDFLATEX], test -n "$PDFLATEX")
40
41
42
43# Checks for library functions.
44AC_FUNC_MALLOC
45AC_FUNC_REALLOC
46AC_FUNC_SETVBUF_REVERSED
47AC_FUNC_VPRINTF
48AC_CHECK_FUNCS([floor pow rint sqrt strchr strstr])
49
50# Thanks to Shane Sturrock from Biomatters
51#case "${host}" in
52#*darwin*)
53#AM_INIT_AUTOMAKE([no-dependencies])
54#ARCH_flag="-arch i386 -arch ppc -arch x86_64 -mmacosx-version-min=10.4"
55#;;
56#esac
57
58
59dnl CFLAGS="-O3 -fomit-frame-pointer -funroll-loops -Wall ${ARCH_flag}"
60dnl CFLAGS="-O3 -Wfloat-equal -fomit-frame-pointer -funroll-loops"
61dnl CFLAGS="-O3 -Wfloat-equal"
62dnl CFLAGS="-g"
63
64LDFLAGS="${ARGC_flag}"
65
66dnl LT_INIT
67dnl AC_PROG_LIBTOOL
68dnl Add option for compiling with debugging informations
69
70AC_ARG_ENABLE([debug],
71              [AS_HELP_STRING([--enable-debug],
72                              [Remove optimization options and add debug informations.])])
73AS_IF([test "x$enable_debug" = "xyes"],
74      [CFLAGS="-ansi -pedantic -Wall -std=c99 -O0 -g"],
75      [CFLAGS="-Wall -O2 -msse -fomit-frame-pointer -funroll-loops ${ARCH_flag}"])
76
77AC_ARG_ENABLE([gprof],
78              [AS_HELP_STRING([--enable-gprof],
79                              [Remove optimization options and add profiling informations.])])
80AS_IF([test "x$enable_gprof" = "xyes"],
81      [CFLAGS="-ansi -pedantic -Wall -std=c99 -O0 -g -pg"],
82      [AS_IF([test "x$enable_debug" = "xno"],[CFLAGS="-Wall -O2 -msse -fomit-frame-pointer -funroll-loops ${ARCH_flag}"])])
83
84AC_ARG_ENABLE([mpi],
85              [AS_HELP_STRING([--enable-mpi],
86                              [Compile with mpicc instead of gcc.])])
87AS_IF([test "x$enable_mpi" = "xyes"],[CC="mpicc"])
88AS_IF([test "x$enable_mpi" = "xyes"],AC_DEFINE([MPI],[1],[MPI tag on]))
89AM_CONDITIONAL([WANT_MPI], [test "x$enable_mpi" = "xyes"])
90
91
92AC_ARG_ENABLE([win],
93              [AS_HELP_STRING([--enable-win],
94                              [Compile with mingw instead of gcc.])])
95AS_IF([test "x$enable_win" = "xyes"],[CC="i586-mingw32msvc-cc"])
96
97AC_ARG_ENABLE([phytime],[AS_HELP_STRING([--enable-phytime],[Compile PhyTime])],[phytime=yes],[phytime=no])
98AM_CONDITIONAL([WANT_PHYTIME], [test "$phytime" = yes])
99if test "$phytime" = yes; then
100   AC_DEFINE([PHYTIME],[1],[PHYTIME tag on])
101fi
102
103AC_ARG_ENABLE([tiporder],[AS_HELP_STRING([--enable-tiporder],[Compile tiporder])],[tiporder=yes],[tiporder=no])
104AM_CONDITIONAL([WANT_TIPORDER], [test "$tiporder" = yes])
105if test "$tiporder" = yes; then
106   AC_DEFINE([TIPORDER],[1],[TIPORDER tag on])
107fi
108
109AC_ARG_ENABLE([part],[AS_HELP_STRING([--enable-part],[Compile Part])],[part=yes],[part=no])
110AM_CONDITIONAL([WANT_PART], [test "$part" = yes])
111if test "$part" = yes; then
112   AC_DEFINE([PART],[1],[PART tag on])
113fi
114
115AC_ARG_ENABLE([rwrap],[AS_HELP_STRING([--enable-rwrap],[Compile Rwrap])],[rwrap=yes],[rwrap=no])
116AM_CONDITIONAL([WANT_RWRAP], [test "$rwrap" = yes])
117if test "$rwrap" = yes; then
118   AC_DEFINE([RWRAP],[1],[RWRAP tag on])
119fi
120
121AC_ARG_ENABLE([phycont],[AS_HELP_STRING([--enable-phycont],[Compile PhyCont])],[phycont=yes],[phycont=no])
122AM_CONDITIONAL([WANT_PHYCONT], [test "$phycont" = yes])
123if test "$phycont" = yes; then
124   AC_DEFINE([PHYCONT],[1],[PHYCONT tag on])
125fi
126
127AC_ARG_ENABLE([m4],[AS_HELP_STRING([--enable-m4],[Compile M4])],[m4=yes],[m4=no])
128AM_CONDITIONAL([WANT_M4], [test "$m4" = yes])
129if test "$m4" = yes; then
130   AC_DEFINE([M4],[1],[m4 tag on])
131fi
132
133AC_ARG_ENABLE([rf],[AS_HELP_STRING([--enable-rf],[Compile RF])],[rf=yes],[rf=no])
134AM_CONDITIONAL([WANT_RF], [test "$rf" = yes])
135if test "$rf" = yes; then
136   AC_DEFINE([RF],[1],[RF tag on])
137fi
138
139AC_ARG_ENABLE([test],[AS_HELP_STRING([--enable-test],[Compile test])],[test=yes],[test=no])
140AM_CONDITIONAL([WANT_TEST], [test "$test" = yes])
141if test "$test" = yes; then
142   AC_DEFINE([TEST],[1],[TEST tag on])
143fi
144
145AC_ARG_ENABLE([evolve],[AS_HELP_STRING([--enable-evolve],[Compile evolve])],[evolve=yes],[evolve=no])
146AM_CONDITIONAL([WANT_EVOLVE], [test "$evolve" = yes])
147if test "$evolve" = yes; then
148   AC_DEFINE([EVOLVE],[1],[EVOLVE tag on])
149fi
150
151AC_ARG_ENABLE([sergeii],[AS_HELP_STRING([--enable-sergeii],[Compile sergeii])],[sergeii=yes],[sergeii=no])
152AM_CONDITIONAL([WANT_SERGEII], [test "$sergeii" = yes])
153if test "$sergeii" = yes; then
154   AC_DEFINE([SERGEII],[1],[SERGEII tag on])
155fi
156
157AC_ARG_ENABLE([geo],[AS_HELP_STRING([--enable-geo],[Compile geo])],[geo=yes],[geo=no])
158AM_CONDITIONAL([WANT_GEO], [test "$geo" = yes])
159if test "$geo" = yes; then
160   AC_DEFINE([GEO],[1],[GEO tag on])
161fi
162
163AC_ARG_ENABLE([checkpoint],[AS_HELP_STRING([--enable-checkpoint],[Compile checkpoint])],[checkpoint=yes],[checkpoint=no])
164AM_CONDITIONAL([WANT_CHECKPOINT], [test "$checkpoint" = yes])
165if test "$checkpoint" = yes; then
166   AC_DEFINE([CHECKPOINT],[1],[CHECKPOINT tag on])
167fi
168
169
170if test "$phytime" = no; then
171if test "$tiporder" = no; then
172if test "$part" = no; then
173if test "$rwrap" = no; then
174if test "$phycont" = no; then
175if test "$m4" = no; then
176if test "$test" = no; then
177if test "$sergeii" = no; then
178if test "$geo" = no; then
179if test "$evolve" = no; then
180if test "$checkpoint" = no; then
181   AC_DEFINE([PHYML],[1],[PHYML tag on])
182fi
183fi
184fi
185fi
186fi
187fi
188fi
189fi
190fi
191fi
192fi
193
194AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])
195AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.