Skip to content

Commit

Permalink
configure.ac: Remove check for unused functions.
Browse files Browse the repository at this point in the history
Remove check for clock_gettime(), clock_nanosleep(), nanosleep() and
gettimeofday() functions as we use C++11's <chrono> facilities now.
  • Loading branch information
wilx committed Aug 25, 2014
1 parent af3b33b commit 9f42a45
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 263 deletions.
220 changes: 0 additions & 220 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -8704,174 +8704,6 @@ if test "$ac_res" != no; then :

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
$as_echo_n "checking for library containing nanosleep... " >&6; }
if ${ac_cv_search_nanosleep+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char nanosleep ();
int
main ()
{
return nanosleep ();
;
return 0;
}
_ACEOF
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_nanosleep=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_nanosleep+:} false; then :
break
fi
done
if ${ac_cv_search_nanosleep+:} false; then :

else
ac_cv_search_nanosleep=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
$as_echo "$ac_cv_search_nanosleep" >&6; }
ac_res=$ac_cv_search_nanosleep
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_nanosleep" >&5
$as_echo_n "checking for library containing clock_nanosleep... " >&6; }
if ${ac_cv_search_clock_nanosleep+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char clock_nanosleep ();
int
main ()
{
return clock_nanosleep ();
;
return 0;
}
_ACEOF
for ac_lib in '' rt posix4; 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_clock_nanosleep=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_clock_nanosleep+:} false; then :
break
fi
done
if ${ac_cv_search_clock_nanosleep+:} false; then :

else
ac_cv_search_clock_nanosleep=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_nanosleep" >&5
$as_echo "$ac_cv_search_clock_nanosleep" >&6; }
ac_res=$ac_cv_search_clock_nanosleep
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"

fi

{ $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
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char clock_gettime ();
int
main ()
{
return clock_gettime ();
;
return 0;
}
_ACEOF
for ac_lib in '' rt posix4; 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_clock_gettime=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_clock_gettime+:} false; then :
break
fi
done
if ${ac_cv_search_clock_gettime+:} false; then :

else
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_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"

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
$as_echo_n "checking for library containing gethostbyname... " >&6; }
if ${ac_cv_search_gethostbyname+:} false; then :
Expand Down Expand Up @@ -10947,58 +10779,6 @@ fi
done


for ac_func in gettimeofday
do :
ac_fn_cxx_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
if test "x$ac_cv_func_gettimeofday" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GETTIMEOFDAY 1
_ACEOF
$as_echo "#define LOG4CPLUS_HAVE_GETTIMEOFDAY 1" >>confdefs.h

fi
done


for ac_func in nanosleep
do :
ac_fn_cxx_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
if test "x$ac_cv_func_nanosleep" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_NANOSLEEP 1
_ACEOF
$as_echo "#define LOG4CPLUS_HAVE_NANOSLEEP 1" >>confdefs.h

fi
done


for ac_func in clock_nanosleep
do :
ac_fn_cxx_check_func "$LINENO" "clock_nanosleep" "ac_cv_func_clock_nanosleep"
if test "x$ac_cv_func_clock_nanosleep" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_CLOCK_NANOSLEEP 1
_ACEOF
$as_echo "#define LOG4CPLUS_HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h

fi
done


for ac_func in clock_gettime
do :
ac_fn_cxx_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
if test "x$ac_cv_func_clock_gettime" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_CLOCK_GETTIME 1
_ACEOF
$as_echo "#define LOG4CPLUS_HAVE_CLOCK_GETTIME 1" >>confdefs.h

fi
done


for ac_func in getpid
do :
ac_fn_cxx_check_func "$LINENO" "getpid" "ac_cv_func_getpid"
Expand Down
7 changes: 0 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,6 @@ AS_IF([test "x$ax_cv_have_var_attribute_init_priority" = "xyes"],
dnl Checks for libraries.

AC_SEARCH_LIBS([strerror], [cposix])
AC_SEARCH_LIBS([nanosleep], [rt])
AC_SEARCH_LIBS([clock_nanosleep], [rt posix4])
AC_SEARCH_LIBS([clock_gettime], [rt posix4])
dnl On some systems libcompat exists only as a static library which
dnl breaks compilation of shared library log4cplus.
dnl AC_SEARCH_LIBS([ftime], [compat])
Expand Down Expand Up @@ -548,10 +545,6 @@ dnl Checks for library functions.

LOG4CPLUS_CHECK_FUNCS([gmtime_r], [LOG4CPLUS_HAVE_GMTIME_R])
LOG4CPLUS_CHECK_FUNCS([localtime_r], [LOG4CPLUS_HAVE_LOCALTIME_R])
LOG4CPLUS_CHECK_FUNCS([gettimeofday], [LOG4CPLUS_HAVE_GETTIMEOFDAY])
LOG4CPLUS_CHECK_FUNCS([nanosleep], [LOG4CPLUS_HAVE_NANOSLEEP])
LOG4CPLUS_CHECK_FUNCS([clock_nanosleep], [LOG4CPLUS_HAVE_CLOCK_NANOSLEEP])
LOG4CPLUS_CHECK_FUNCS([clock_gettime], [LOG4CPLUS_HAVE_CLOCK_GETTIME])
LOG4CPLUS_CHECK_FUNCS([getpid], [LOG4CPLUS_HAVE_GETPID])
LOG4CPLUS_CHECK_FUNCS([poll], [LOG4CPLUS_HAVE_POLL])
LOG4CPLUS_CHECK_FUNCS([pipe], [LOG4CPLUS_HAVE_PIPE])
Expand Down
24 changes: 0 additions & 24 deletions include/log4cplus/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
/* Defined if the compiler provides atomic_inc_uint(). */
#undef HAVE_ATOMIC_INC_UINT

/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME

/* Define to 1 if you have the `clock_nanosleep' function. */
#undef HAVE_CLOCK_NANOSLEEP

/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11

Expand Down Expand Up @@ -54,9 +48,6 @@
/* Define to 1 if you have the `getpid' function. */
#undef HAVE_GETPID

/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY

/* Define to 1 if you have the `gmtime_r' function. */
#undef HAVE_GMTIME_R

Expand Down Expand Up @@ -114,9 +105,6 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

/* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP

/* Define to 1 if you have the `ntohl' function. */
#undef HAVE_NTOHL

Expand Down Expand Up @@ -253,12 +241,6 @@
/* */
#undef LOG4CPLUS_HAVE_C99_VARIADIC_MACROS

/* */
#undef LOG4CPLUS_HAVE_CLOCK_GETTIME

/* */
#undef LOG4CPLUS_HAVE_CLOCK_NANOSLEEP

/* */
#undef LOG4CPLUS_HAVE_CXX11_ATOMICS

Expand Down Expand Up @@ -301,9 +283,6 @@
/* */
#undef LOG4CPLUS_HAVE_GETTID

/* */
#undef LOG4CPLUS_HAVE_GETTIMEOFDAY

/* */
#undef LOG4CPLUS_HAVE_GMTIME_R

Expand Down Expand Up @@ -343,9 +322,6 @@
/* */
#undef LOG4CPLUS_HAVE_MBSTOWCS

/* */
#undef LOG4CPLUS_HAVE_NANOSLEEP

/* */
#undef LOG4CPLUS_HAVE_NETDB_H

Expand Down
12 changes: 0 additions & 12 deletions include/log4cplus/config/defines.hxx.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,6 @@
/* */
#undef LOG4CPLUS_HAVE_GETPID

/* */
#undef LOG4CPLUS_HAVE_GETTIMEOFDAY

/* Define to 1 if you have the `clock_gettime' function. */
#undef LOG4CPLUS_HAVE_CLOCK_GETTIME

/* Define to 1 if you have the `nanosleep' function. */
#undef LOG4CPLUS_HAVE_NANOSLEEP

/* Define to 1 if you have the `clock_nanosleep' function. */
#undef LOG4CPLUS_HAVE_CLOCK_NANOSLEEP

/* */
#undef LOG4CPLUS_HAVE_GMTIME_R

Expand Down

0 comments on commit 9f42a45

Please sign in to comment.