dnl Process this file with autoconf to produce a configure script. AC_INIT([ViennaRNA],[1.8.5],[rna@tbi.univie.ac.at],[ViennaRNA]) dnl Every other copy of the package version number gets its value from here AM_INIT_AUTOMAKE dnl change the default installation prefix dnl AC_PREFIX_DEFAULT(/usr/local/RNA) dnl configure options AM_WITH_DMALLOC AC_ARG_WITH(cluster, [ --with-cluster build AnalyseSeqs and AnalyseDists]) AC_ARG_WITH(perl, [ --without-perl don't build Perl module]) AC_ARG_WITH(forester, [ --without-forester don't build RNAforester program]) AC_ARG_WITH(kinfold, [ --without-kinfold don't build Kinfold program]) AC_ARG_ENABLE(floatpf, [ --enable-floatpf use float instead of double for partition function], []) AC_ARG_VAR(PERLPREFIX, [Prefix for installation of the Perl module. By default the perl module is installed wherever Perl thinks it belongs, ignoring the $prefix used by configure]) dnl create a config.h file (Automake will add -DHAVE_CONFIG_H) AC_CONFIG_HEADERS([config.h]) AC_SUBST(VERSION) ISODATE=`date +%Y-%m-%d` AC_SUBST(ISODATE) AC_CANONICAL_HOST dnl Checks for programs. AC_PROG_CC AC_PROG_CC_FPIC AC_ARG_VAR(FPIC,[compiler flag for generating PIC code that can be used in a shared library]) if test "$GCC" = yes; then AC_DEFINE(UNUSED, __attribute__ ((unused)), avoid warning about unused variables) else AC_DEFINE(UNUSED,, only for gcc) fi AC_PROG_INSTALL AC_PROG_RANLIB AM_PROG_CC_C_O AC_PATH_PROG(PerlCmd, perl) if test -n "$PerlCmd"; then if $PerlCmd -e 'require 5.004'; then : else AC_MSG_RESULT(You need Perl version 5.004 or higher for the Perl module) with_perl="no" fi fi if test -z "$PerlCmd"; then AC_MSG_RESULT(No suitable Perl found -- will not build Perl module) AC_MSG_RESULT(You may set the PerlCmd environment variable to point to a suitable perl binary) with_perl="no" fi if test "$with_forester" != "no"; then if test -f $srcdir/RNAforester/Makefile.am; then AC_CONFIG_SUBDIRS(RNAforester) else AC_MSG_WARN([RNAforester subdirectory does not exist]) with_forester="no" fi fi if test "$with_kinfold" != "no"; then if test -f $srcdir/Kinfold/Makefile.am; then AC_CONFIG_SUBDIRS(Kinfold) else AC_MSG_WARN([Kinfold subdirectory does not exist]) with_kinfold="no" fi fi AM_CONDITIONAL(MAKE_PERL_EXT, test "$with_perl" != "no") AM_CONDITIONAL(MAKE_CLUSTER, test "$with_cluster" = "yes") AM_CONDITIONAL(MAKE_FORESTER, test "$with_forester" != "no") AM_CONDITIONAL(MAKE_KINFOLD, test "$with_kinfold" != "no") dnl Checks for libraries. dnl AC_REPLACE_GNU_GETOPT dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(malloc.h strings.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_C_INLINE([]) dnl Checks for library functions. AC_CHECK_FUNCS(strdup strstr strchr erand48) AC_CONFIG_FILES([Makefile ViennaRNA.spec Utils/Makefile Progs/Makefile lib/Makefile man/Makefile Cluster/Makefile H/Makefile Perl/Makefile man/RNAheat.1 man/RNAsubopt.1 man/RNAdistance.1 man/RNAinverse.1 man/RNAeval.1 man/RNAfold.1 man/RNApdist.1 man/RNAplot.1 man/RNALfold.1 man/RNAalifold.1 man/RNAduplex.1 man/RNAcofold.1 man/RNAplfold.1 man/RNAup.1 man/RNApaln.1 man/RNAaliduplex.1]) AC_OUTPUT eval _bindir=$(eval echo $bindir) eval _libdir=$(eval echo $libdir) eval _includedir=${includedir} eval _datadir=$datadir eval _mandir=$mandir AC_MSG_NOTICE( [ Configure successful with the following options: Perl Extension: ${with_perl:-yes} Analyse{Dists,Seqs}: ${with_cluster:-no} Kinfold: ${with_kinfold:-yes} RNAforester: ${with_forester:-yes} Files will be installed in the following directories: Executables: $_bindir Libraries: $_libdir Header files: $_includedir Extra Data: $_datadir Man pages: $_mandir ])