Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a89bf4d
Merge pull request #81 from msoni3/master
shelswenson Aug 8, 2012
ddb4153
Merge pull request #82 from msoni3/master
shelswenson Aug 17, 2012
9561d05
Merge pull request #83 from msoni3/master
shelswenson Aug 20, 2012
cfe4de3
Merge pull request #90 from msoni3/master
shelswenson Aug 24, 2012
5b67145
Merge pull request #91 from msoni3/master
shelswenson Aug 26, 2012
e46566f
Merge pull request #98 from msoni3/master
shelswenson Aug 28, 2012
0f96b2b
Merge pull request #99 from msoni3/master
shelswenson Aug 28, 2012
3296721
Merge pull request #100 from msoni3/master
shelswenson Aug 29, 2012
56e2cc3
Merge pull request #102 from msoni3/master
shelswenson Aug 29, 2012
86771ce
Merge pull request #103 from msoni3/master
shelswenson Aug 29, 2012
6444777
Merge pull request #104 from msoni3/master
shelswenson Aug 29, 2012
c767be0
Merge pull request #108 from msoni3/master
shelswenson Sep 10, 2012
c67e647
Merge pull request #109 from msoni3/master
shelswenson Sep 25, 2012
abfad4b
Merge pull request #110 from msoni3/master
shelswenson Oct 5, 2012
66c3068
Merge pull request #111 from msoni3/master
shelswenson Oct 8, 2012
ad756f8
Merge pull request #112 from msoni3/master
shelswenson Oct 17, 2012
80b8afa
Merge pull request #113 from msoni3/master
shelswenson Oct 29, 2012
cb461c6
Merge pull request #114 from msoni3/master
shelswenson Nov 7, 2012
9d0fe64
Merge pull request #115 from msoni3/master
shelswenson Nov 12, 2012
a39301a
Merge pull request #116 from msoni3/master
shelswenson Nov 19, 2012
2f91807
Merge pull request #117 from msoni3/master
shelswenson Dec 3, 2012
b3559d4
Randomness, Mersenne Twister, and std=c++0x
Irdakuh Dec 4, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
376 changes: 191 additions & 185 deletions gtfold-mfe/configure.in
Original file line number Diff line number Diff line change
@@ -1,185 +1,191 @@
dnl Process this file with autoconf to produce a configure script.

dnl AC_PREREQ([2.67])
dnl AC 2.62 needed for OpenMP
AC_PREREQ([2.63])

dnl AC_INIT (package, version, [bug-report-email], [tarname])
AC_INIT([gtfold],[2.0])

dnl check for this file's existence to make sure that the directory
dnl specified by --srcdir is the right one
AC_CONFIG_SRCDIR([README])

dnl Specify a header configuration file
AC_CONFIG_HEADERS([gtfold_config.h])

dnl Compute the canonical host-system type variable, host, and its
dnl three individual parts host_cpu, host_vendor, and host_os.
AC_CANONICAL_TARGET

dnl Initialize Automake
AM_INIT_AUTOMAKE

dnl Argument -enable-64bit specifies that the library should be
dnl compiled for 64-bit environments, if possible.
AC_ARG_ENABLE(64bit,
[ --enable-64bit compile for 64-bit environments],
[case "${enableval}" in
"" | y | ye | yes) gtfold_cv_enable_64bit=yes ;;
n | no) gtfold_cv_enable_64bit=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-64bit) ;;
esac],
[gtfold_cv_enable_64bit=no])

if test "$gtfold_cv_enable_64bit" == "yes" ;
then
if test "$gtfold_cv_check_sunpro_cc" == "yes" ; then
CFLAGS=$(echo $CFLAGS | sed -e 's/-fast\|-xarch=.*//g')
CFLAGS="$CFLAGS -fast -xarch=v9 -lgmp"
else
if test "$GCC" == "yes"; then
CFLAGS=$(echo $CFLAGS | sed -e 's/-m32\|-m64//g')
CFLAGS="$CFLAGS -m64 -lgmp"
fi
fi
fi


dnl Search for a C compiler starting with the specified list
AC_PROG_CC([xlc gcc icc cc])
dnl Search for a C++ compiler starting with the specified list
AC_PROG_CXX([xlC g++ iCC CC])
dnl Check for programs
#AC_PROG_LIBTOOL
AC_PROG_INSTALL

AC_OPENMP

#AC_DEFINE([_RAND],[],[RNG library to use])

dnl Check for libraries
AC_CHECK_LIB(m, log2, AC_DEFINE([HAVE_LOG2],[],[log2 function is present]))

dnl Check for header files
AC_HEADER_STDC
#AC_CHECK_HEADERS(sys/resource.h)
#AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h])

dnl Check for typedefs, structures, C compiler characteristics
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM

dnl If using xlC add OPENMP_CFLAGS to the link flags
if test "x$CXX" = "xxlC"; then
LDFLAGS="-qsmp=omp"
fi

dnl This is an example how to specify different CFLAGS depending on
dnl the C compiler detected:

dnl If gcc is present, use -Wall
if test "x$GCC" = "xyes"; then
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
CFLAGS="$CFLAGS -Wall"
fi
fi

dnl If g++ is present, use -Wall
if test "x$GXX" = "xyes"; then
if test -z "`echo "$CXXFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
CXXFLAGS="$CXXFLAGS -Wall -lgmp"
fi
fi

dnl This is an example how to check for compiler characteristics that
dnl are not a part of the standard Autoconf tests:

#If Sun cc is present, define appropriate compiler flags
AC_MSG_CHECKING(for Sun C compiler)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __SUNPRO_C
#include "error: this is not a Sun C compiler."
#endif
]])],[AC_MSG_RESULT(yes)
gtfold_cv_check_sunpro_cc=yes],[AC_MSG_RESULT(no)
gtfold_cv_check_sunpro_cc=no])

if test "$gtfold_cv_check_sunpro_cc" == "yes";
then
AC_MSG_CHECKING(for Sun C compiler architecture target)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __sparc
#include "error: this is not a Sun Sparc processor."
#endif
]])],[AC_MSG_RESULT(yes)
gtfold_cv_check_sun_sparc=yes],[AC_MSG_RESULT(no)
gtfold_cv_check_sun_sparc=no])
fi

if test "$gtfold_cv_check_sunpro_cc" == "yes";
then
if test "$gtfold_cv_check_sun_sparc" == "yes";
then
AC_MSG_CHECKING(for Sun sparc v9 architecture)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __sparcv9
#include "error: this is not a Sun Sparc V9 processor."
#endif
]])],[AC_MSG_RESULT(yes)
gtfold_cv_check_sun_sparcv9=yes],[AC_MSG_RESULT(no)
gtfold_cv_check_sun_sparcv9=no])
fi
fi

if test "$gtfold_cv_check_sunpro_cc" == "yes";
then
CFLAGS="$CFLAGS -mt -fast"
LIBS="$LIBS -lmtsk"
if test "$gtfold_cv_check_sun_sparc" == "yes";
then
if test "$gtfold_cv_check_sun_sparcv9" == "yes";
then
CFLAGS="$CFLAGS -xarch=v9"
else
CFLAGS="$CFLAGS -xarch=v8plusa"
fi
fi
fi


if test "$enable_openmp" != 'no'; then
if test "x${GCC}" = "xyes"; then
AC_CHECK_LIB( omp,GOMP_parallel_start,LIB_OMP="-lgomp",,)
AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
else
AC_CHECK_LIB(mtsk,sunw_mp_register_warn,LIB_OMP="-lmtsk",,)
AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
fi
LIBS="$GOMP_LIBS $LIBS"
fi


dnl Check for library functions
AC_CHECK_FUNCS(floor gettimeofday pow)

dnl debug flag
AC_ARG_ENABLE(debug,
[ --enable-debug turn on debugging],
[case "${enableval}" in
"" | y | ye | yes) debug=true;
CFLAGS=$(echo $CFLAGS -g | sed -e 's/-O\|-O2\|-O3//g') ;;
n | no) debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],
[debug=false])
AM_CONDITIONAL(GTFOLD_DEBUG, test x$debug = xtrue)

dnl Create makefiles and other configuration files
AC_CONFIG_FILES([Makefile src/Makefile data/Makefile include/Makefile])
AC_CONFIG_FILES([data/Turner99/Makefile data/Turner04/Makefile data/Andronescu/Makefile data/UNAParams/Makefile data/RNAParams/Makefile])

dnl Generate `config.status' and launch it
AC_OUTPUT

dnl Process this file with autoconf to produce a configure script.

dnl AC_PREREQ([2.67])
dnl AC 2.62 needed for OpenMP
AC_PREREQ([2.63])

dnl AC_INIT (package, version, [bug-report-email], [tarname])
AC_INIT([gtfold],[2.0])

dnl check for this file's existence to make sure that the directory
dnl specified by --srcdir is the right one
AC_CONFIG_SRCDIR([README])

dnl Specify a header configuration file
AC_CONFIG_HEADERS([gtfold_config.h])

dnl Compute the canonical host-system type variable, host, and its
dnl three individual parts host_cpu, host_vendor, and host_os.
AC_CANONICAL_TARGET

dnl Initialize Automake
AM_INIT_AUTOMAKE

dnl Argument -enable-64bit specifies that the library should be
dnl compiled for 64-bit environments, if possible.
AC_ARG_ENABLE(64bit,
[ --enable-64bit compile for 64-bit environments],
[case "${enableval}" in
"" | y | ye | yes) gtfold_cv_enable_64bit=yes ;;
n | no) gtfold_cv_enable_64bit=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-64bit) ;;
esac],
[gtfold_cv_enable_64bit=no])

if test "$gtfold_cv_enable_64bit" == "yes" ;
then
if test "$gtfold_cv_check_sunpro_cc" == "yes" ; then
CFLAGS=$(echo $CFLAGS | sed -e 's/-fast\|-xarch=.*//g')
CFLAGS="$CFLAGS -fast -xarch=v9 -lgmp"
else
if test "$GCC" == "yes"; then
CFLAGS=$(echo $CFLAGS | sed -e 's/-m32\|-m64//g')
CFLAGS="$CFLAGS -m64 -lgmp"
fi
fi
fi


dnl Search for a C compiler starting with the specified list
AC_PROG_CC([xlc gcc icc cc])
dnl Search for a C++ compiler starting with the specified list
AC_PROG_CXX([xlC g++ iCC CC])
dnl Check for programs
#AC_PROG_LIBTOOL
AC_PROG_INSTALL

AC_OPENMP

#AC_DEFINE([_RAND],[],[RNG library to use])

dnl Check for libraries
AC_CHECK_LIB(m, log2, AC_DEFINE([HAVE_LOG2],[],[log2 function is present]))

dnl Check for header files
AC_HEADER_STDC
#AC_CHECK_HEADERS(sys/resource.h)
#AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h])

dnl Check for typedefs, structures, C compiler characteristics
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM

dnl If using xlC add OPENMP_CFLAGS to the link flags
if test "x$CXX" = "xxlC"; then
LDFLAGS="-qsmp=omp"
fi

dnl This is an example how to specify different CFLAGS depending on
dnl the C compiler detected:

dnl If gcc is present, use -Wall
if test "x$GCC" = "xyes"; then
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
CFLAGS="$CFLAGS -Wall"
fi
fi

dnl If g++ is present, use -Wall
if test "x$GXX" = "xyes"; then
if test -z "`echo "$CXXFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
CXXFLAGS="$CXXFLAGS -Wall -lgmp"
fi
fi

dnl hopefully this works every time?
if test true; then
CFLAGS="$CFLAGS -std=c++0x"
CXXFLAGS="$CXXFLAGS -std=c++0x"
fi

dnl This is an example how to check for compiler characteristics that
dnl are not a part of the standard Autoconf tests:

#If Sun cc is present, define appropriate compiler flags
AC_MSG_CHECKING(for Sun C compiler)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __SUNPRO_C
#include "error: this is not a Sun C compiler."
#endif
]])],[AC_MSG_RESULT(yes)
gtfold_cv_check_sunpro_cc=yes],[AC_MSG_RESULT(no)
gtfold_cv_check_sunpro_cc=no])

if test "$gtfold_cv_check_sunpro_cc" == "yes";
then
AC_MSG_CHECKING(for Sun C compiler architecture target)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __sparc
#include "error: this is not a Sun Sparc processor."
#endif
]])],[AC_MSG_RESULT(yes)
gtfold_cv_check_sun_sparc=yes],[AC_MSG_RESULT(no)
gtfold_cv_check_sun_sparc=no])
fi

if test "$gtfold_cv_check_sunpro_cc" == "yes";
then
if test "$gtfold_cv_check_sun_sparc" == "yes";
then
AC_MSG_CHECKING(for Sun sparc v9 architecture)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __sparcv9
#include "error: this is not a Sun Sparc V9 processor."
#endif
]])],[AC_MSG_RESULT(yes)
gtfold_cv_check_sun_sparcv9=yes],[AC_MSG_RESULT(no)
gtfold_cv_check_sun_sparcv9=no])
fi
fi

if test "$gtfold_cv_check_sunpro_cc" == "yes";
then
CFLAGS="$CFLAGS -mt -fast"
LIBS="$LIBS -lmtsk"
if test "$gtfold_cv_check_sun_sparc" == "yes";
then
if test "$gtfold_cv_check_sun_sparcv9" == "yes";
then
CFLAGS="$CFLAGS -xarch=v9"
else
CFLAGS="$CFLAGS -xarch=v8plusa"
fi
fi
fi


if test "$enable_openmp" != 'no'; then
if test "x${GCC}" = "xyes"; then
AC_CHECK_LIB( omp,GOMP_parallel_start,LIB_OMP="-lgomp",,)
AC_CHECK_LIB(gomp,GOMP_parallel_start,GOMP_LIBS="-lgomp",,)
else
AC_CHECK_LIB(mtsk,sunw_mp_register_warn,LIB_OMP="-lmtsk",,)
AC_CHECK_LIB(mtsk,sunw_mp_register_warn,GOMP_LIBS="-lmtsk",,)
fi
LIBS="$GOMP_LIBS $LIBS"
fi


dnl Check for library functions
AC_CHECK_FUNCS(floor gettimeofday pow)

dnl debug flag
AC_ARG_ENABLE(debug,
[ --enable-debug turn on debugging],
[case "${enableval}" in
"" | y | ye | yes) debug=true;
CFLAGS=$(echo $CFLAGS -g | sed -e 's/-O\|-O2\|-O3//g') ;;
n | no) debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],
[debug=false])
AM_CONDITIONAL(GTFOLD_DEBUG, test x$debug = xtrue)

dnl Create makefiles and other configuration files
AC_CONFIG_FILES([Makefile src/Makefile data/Makefile include/Makefile])
AC_CONFIG_FILES([data/Turner99/Makefile data/Turner04/Makefile data/Andronescu/Makefile data/UNAParams/Makefile data/RNAParams/Makefile])

dnl Generate `config.status' and launch it
AC_OUTPUT

Loading