Skip to content

Commit

Permalink
addressed error in configure.ac
Browse files Browse the repository at this point in the history
  • Loading branch information
walaj committed Jun 28, 2017
1 parent 46b440c commit cc25102
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ env:
before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get -qq update
- sudo apt-get install lzma
- if [ "${TRAVIS_BRANCH}" = "master" ]; then export BOOST_VERSION="${BOOST_VERSION_MIN}"; else export BOOST_VERSION="${BOOST_VERSION_MAX}"; fi
- if [ -n "${BOOST_VERSION}" ]; then export BOOST_ROOT="${TRAVIS_BUILD_DIR}/../boost-trunk"; export CMAKE_MODULE_PATH="${BOOST_ROOT}"; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" -a "${CXX}" = "clang++" ]; then export CXX="$(which c++)"; export CC="$(which cc)"; fi
Expand Down
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */

/* clock_getttime found */
#undef HAVE_CLOCK_GETTIME

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

Expand Down
34 changes: 17 additions & 17 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4779,7 +4779,7 @@ return lzma_code ();
return 0;
}
_ACEOF
for ac_lib in '' zma; do
for ac_lib in '' lzma; do
if test -z "$ac_lib"; then
ac_res="none required"
else
Expand Down Expand Up @@ -4810,7 +4810,7 @@ if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "lzma not found, please install lzma (http://www.7-zip.org/sdk.html)" "$LINENO" 5
as_fn_error $? "liblzma not found, please install lzma (http://www.7-zip.org/sdk.html)" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing BZ2_bzBuffToBuffDecompress" >&5
Expand Down Expand Up @@ -4871,9 +4871,9 @@ else
as_fn_error $? "lib bz2 not found, please install" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing z" >&5
$as_echo_n "checking for library containing z... " >&6; }
if ${ac_cv_search_z+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
$as_echo_n "checking for library containing clock_gettime... " >&6; }
if ${ac_cv_search_clock_gettime+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
Expand All @@ -4886,47 +4886,47 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
char z ();
char clock_gettime ();
int
main ()
{
return z ();
return clock_gettime ();
;
return 0;
}
_ACEOF
for ac_lib in '' zma; do
for ac_lib in '' rt; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_search_z=$ac_res
ac_cv_search_clock_gettime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_z+:} false; then :
if ${ac_cv_search_clock_gettime+:} false; then :
break
fi
done
if ${ac_cv_search_z+:} false; then :
if ${ac_cv_search_clock_gettime+:} false; then :
else
ac_cv_search_z=no
ac_cv_search_clock_gettime=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_z" >&5
$as_echo "$ac_cv_search_z" >&6; }
ac_res=$ac_cv_search_z
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
$as_echo "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "lzma not found, please install lzma (http://www.7-zip.org/sdk.html)" "$LINENO" 5
$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
fi
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ AC_CHECK_HEADER([zlib.h])

# Check for libraries
AC_SEARCH_LIBS([gzopen],[z],,[AC_MSG_ERROR([libz not found, please install zlib (http://www.zlib.net/)])])
AC_SEARCH_LIBS([lzma_code],[zma],,[AC_MSG_ERROR([lzma not found, please install lzma (http://www.7-zip.org/sdk.html)])])
AC_SEARCH_LIBS([lzma_code],[lzma],,[AC_MSG_ERROR([liblzma not found, please install lzma (http://www.7-zip.org/sdk.html)])])
AC_SEARCH_LIBS([BZ2_bzBuffToBuffDecompress],[bz2],,[AC_MSG_ERROR([lib bz2 not found, please install])])
AC_SEARCH_LIBS([z],[zma],,[AC_MSG_ERROR([lzma not found, please install lzma (http://www.7-zip.org/sdk.html)])])
AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [clock_getttime found])], )

# check for c++11
#AX_CXX_COMPILE_STDCXX_11(,[optional])
Expand Down

0 comments on commit cc25102

Please sign in to comment.