Skip to content

Commit cc25102

Browse files
author
walaj
committed
addressed error in configure.ac
1 parent 46b440c commit cc25102

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ env:
4949
before_install:
5050
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
5151
- sudo apt-get -qq update
52-
- sudo apt-get install lzma
5352
- if [ "${TRAVIS_BRANCH}" = "master" ]; then export BOOST_VERSION="${BOOST_VERSION_MIN}"; else export BOOST_VERSION="${BOOST_VERSION_MAX}"; fi
5453
- if [ -n "${BOOST_VERSION}" ]; then export BOOST_ROOT="${TRAVIS_BUILD_DIR}/../boost-trunk"; export CMAKE_MODULE_PATH="${BOOST_ROOT}"; fi
5554
- if [ "${TRAVIS_OS_NAME}" = "osx" -a "${CXX}" = "clang++" ]; then export CXX="$(which c++)"; export CC="$(which cc)"; fi

config.h.in

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/* config.h.in. Generated from configure.ac by autoheader. */
22

3+
/* clock_getttime found */
4+
#undef HAVE_CLOCK_GETTIME
5+
36
/* Define to 1 if you have the <inttypes.h> header file. */
47
#undef HAVE_INTTYPES_H
58

configure

+17-17
Original file line numberDiff line numberDiff line change
@@ -4779,7 +4779,7 @@ return lzma_code ();
47794779
return 0;
47804780
}
47814781
_ACEOF
4782-
for ac_lib in '' zma; do
4782+
for ac_lib in '' lzma; do
47834783
if test -z "$ac_lib"; then
47844784
ac_res="none required"
47854785
else
@@ -4810,7 +4810,7 @@ if test "$ac_res" != no; then :
48104810
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
48114811
48124812
else
4813-
as_fn_error $? "lzma not found, please install lzma (http://www.7-zip.org/sdk.html)" "$LINENO" 5
4813+
as_fn_error $? "liblzma not found, please install lzma (http://www.7-zip.org/sdk.html)" "$LINENO" 5
48144814
fi
48154815
48164816
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing BZ2_bzBuffToBuffDecompress" >&5
@@ -4871,9 +4871,9 @@ else
48714871
as_fn_error $? "lib bz2 not found, please install" "$LINENO" 5
48724872
fi
48734873
4874-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing z" >&5
4875-
$as_echo_n "checking for library containing z... " >&6; }
4876-
if ${ac_cv_search_z+:} false; then :
4874+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
4875+
$as_echo_n "checking for library containing clock_gettime... " >&6; }
4876+
if ${ac_cv_search_clock_gettime+:} false; then :
48774877
$as_echo_n "(cached) " >&6
48784878
else
48794879
ac_func_search_save_LIBS=$LIBS
@@ -4886,47 +4886,47 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48864886
#ifdef __cplusplus
48874887
extern "C"
48884888
#endif
4889-
char z ();
4889+
char clock_gettime ();
48904890
int
48914891
main ()
48924892
{
4893-
return z ();
4893+
return clock_gettime ();
48944894
;
48954895
return 0;
48964896
}
48974897
_ACEOF
4898-
for ac_lib in '' zma; do
4898+
for ac_lib in '' rt; do
48994899
if test -z "$ac_lib"; then
49004900
ac_res="none required"
49014901
else
49024902
ac_res=-l$ac_lib
49034903
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
49044904
fi
49054905
if ac_fn_cxx_try_link "$LINENO"; then :
4906-
ac_cv_search_z=$ac_res
4906+
ac_cv_search_clock_gettime=$ac_res
49074907
fi
49084908
rm -f core conftest.err conftest.$ac_objext \
49094909
conftest$ac_exeext
4910-
if ${ac_cv_search_z+:} false; then :
4910+
if ${ac_cv_search_clock_gettime+:} false; then :
49114911
break
49124912
fi
49134913
done
4914-
if ${ac_cv_search_z+:} false; then :
4914+
if ${ac_cv_search_clock_gettime+:} false; then :
49154915
49164916
else
4917-
ac_cv_search_z=no
4917+
ac_cv_search_clock_gettime=no
49184918
fi
49194919
rm conftest.$ac_ext
49204920
LIBS=$ac_func_search_save_LIBS
49214921
fi
4922-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_z" >&5
4923-
$as_echo "$ac_cv_search_z" >&6; }
4924-
ac_res=$ac_cv_search_z
4922+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
4923+
$as_echo "$ac_cv_search_clock_gettime" >&6; }
4924+
ac_res=$ac_cv_search_clock_gettime
49254925
if test "$ac_res" != no; then :
49264926
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49274927
4928-
else
4929-
as_fn_error $? "lzma not found, please install lzma (http://www.7-zip.org/sdk.html)" "$LINENO" 5
4928+
$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
4929+
49304930
fi
49314931
49324932

configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ AC_CHECK_HEADER([zlib.h])
1818

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

2525
# check for c++11
2626
#AX_CXX_COMPILE_STDCXX_11(,[optional])

0 commit comments

Comments
 (0)