JWS-112 Bumping version of ClustalW (src, binaries and windows) to version 2.1.
[jabaws.git] / binaries / src / clustalw / configure.ac
1 # Andreas Wilm (UCD): 2007-12-10
2 # Generated using the following sites 
3 # http://www.openismus.com/documents/linux/automake/automake.shtml
4 # http://www.bioinf.uni-freiburg.de/~mmann/HowTo/automake.html
5 #
6 # autoconf looks for a file called configure.ac (or, previously,
7 # configure.in). It then creates the configure script, based on the
8 # macros which it finds.  Whenever you add a macro to configure.ac,
9 # you should run aclocal as well as autoconf, because aclocal scans
10 # configure.ac to find which macros it should provide.
11
12
13 # This is all black magic and we (as well as all reasonable
14 # developers) should change to a sane system like e.g. SCons
15 # http://freshmeat.net/articles/stop-the-autoconf-insanity-why-we-need-a-new-build-system
16
17
18 # Andreas Wilm (UCD):
19 #  you will only have to change the version number here!
20 #  after apllying any changes you will have to run
21 #  $ autoreconf
22 #
23 AC_INIT([clustalw], [2.1], [clustalw@ucd.ie])
24 #
25 # The AC_INIT macro can take any source file as an argument. It just
26 # checks that the file is there, which should, in turn, mean that the
27 # source directory is there.
28 # AC_INIT generates the following m4 macros, output variables and preprocessor symbols:
29 #  * [AC_]PACKAGE_NAME
30 #  * [AC_]PACKAGE_TARNAME
31 #  * [AC_]PACKAGE_VERSION
32 #  * [AC_]PACKAGE_STRING
33 #  * [AC_]PACKAGE_BUGREPORT 
34
35
36 # Detect the canonical host and target build environment
37 # see e.g. http://cvs.haskell.org/darcs/ghc/configure.ac for howto use
38 # AC_CANONICAL_HOST or AC_CANONICAL_TARGET?
39 # AC_CANONICAL_SYSTEM will also run AC_CANONICAL_HOST and allows to use --target
40 AC_CANONICAL_SYSTEM
41 # DEFINES here are going to config.h and have to be the same as in clustalx.pro
42 #echo "host_os $host_os"
43 case $target_os in
44    *linux*|*solaris*|*bsd*)
45         AC_DEFINE([OS_UNIX], [1], [Host OS])
46         ;; 
47    *darwin*)
48         AC_DEFINE([OS_MAC], [1], [Host OS])
49         AC_DEFINE([OS_UNIX], [1], [Host OS])
50         ;; 
51    *cygwin*|*mingw*)
52         AC_DEFINE([OS_WINDOWS], [1], [Host OS])
53         ;;
54    *)
55         AC_MSG_WARN(["Couldn't determine target operating system. Using Unix"]);
56         AC_DEFINE([OS_UNIX], [1], [Host OS])
57         ;;
58 esac
59 echo "building for $target_os"
60
61
62 # set in clustalw_version.h[.in] rather than config.h to avoid name clashes
63 #AC_DEFINE_UNQUOTED(CLUSTALW_VERSION, "${PACKAGE_VERSION}", [ClustalW version])
64 #AC_DEFINE_UNQUOTED(CLUSTALW_NAME, "ClustalW", [ClustalW name])
65 CLUSTALW_VERSION="${PACKAGE_VERSION}"
66 AC_SUBST(CLUSTALW_VERSION)
67 CLUSTALW_NAME="ClustalW"
68 AC_SUBST(CLUSTALW_NAME)
69
70 # The AM_INIT_AUTOMAKE line adds several standard checks. 
71 # This macro is always needed for automake
72 # Obsolete: It takes the program name and version number as arguments.
73 AM_INIT_AUTOMAKE([])
74
75 AC_PROG_MAKE_SET
76
77 # AC_PROG_CC indicates that the source code may be in C. If the source
78 # code is C++ then we also need AC_PROG_CXX.
79 AC_PROG_CC
80 AC_PROG_CXX
81 # AC_PROG_RANLIB will allow you to build code in sub-directories into
82 # temporary libraries, which make will then link in with the rest of
83 # the code.
84 AC_PROG_RANLIB
85 # AC_PROG_INSTALL will generate an install target so that users may
86 # just type 'make install' to install the software.
87 AC_PROG_INSTALL
88
89 # use C++ compiler and linker
90 AC_LANG_CPLUSPLUS
91
92
93 # Checks for header files.
94 AC_HEADER_STDC
95 # AC_CHECK_HEADERS([a.h b.h])
96
97 # Checks for typedefs, structures, and compiler characteristics.
98 AC_HEADER_STDBOOL
99 AC_C_CONST
100 AC_TYPE_SIZE_T
101
102
103
104 # This may beincluded by your source code and provides a way for
105 # people to customise the configuration for their platform, via
106 # #defines. config.h.in can be generated automatically with the
107 # autoheader tool.  However, you need a stamp-h file in your project
108 # to ensure that automake regenerates config.h from config.h.in. Type
109 # 'touch stamp-h' to add this file to your project.
110 # Andreas Wilm: standard would be config.h but let's avoid conflicts with 
111 AM_CONFIG_HEADER(src/config.h) 
112
113 AC_FUNC_MALLOC
114
115 # enable hashing if requested (--with-mhash)
116 # will set HAVE_MHASH_H only 
117 AC_ARG_WITH([mhash],
118         [AS_HELP_STRING([--with-mhash],
119        [Enable mhash support in stats])],
120        [with_mhash=$withval],
121        [with_mhash=no])
122 if test "$with_mhash" = "yes"; then
123     AC_CHECK_LIB([mhash], [mhash_init], ,
124        [AC_MSG_ERROR([mhash lib not found])])
125     AC_CHECK_HEADERS([mhash.h], ,
126        [AC_MSG_ERROR([mhash header not found])])
127
128 fi
129         
130
131 # AC_OUTPUT indicates the name of the Makefile which will be generated.
132 ### AC_CONFIG_FILES([ Makefile ])
133 AC_OUTPUT(Makefile m4/Makefile src/Makefile src/clustalw_version.h)