X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=acinclude.m4;h=936739577c05fdafaa20a1d7928c0655bfc48733;hp=6243c21182726a7dc07b3aace4579bcc30288f46;hb=342b22c3e74a10d7049285c2cea7383676bcfc95;hpb=0bac2398d14f8a11c3430872c2503b93a596ea66 diff --git a/acinclude.m4 b/acinclude.m4 index 6243c21..9367395 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -19,7 +19,7 @@ AC_DEFUN([EX_CHECK_ALL], EX_CHECK_STATE=NO ex_check_save_LIBS=${LIBS} ex_check_save_CPPFLAGS=${CPPFLAGS} - ex_check_save_LDFLAGS=${LDPFLAGS} + ex_check_save_LDFLAGS=${LDFLAGS} if test "x$7" != "x"; then CPPFLAGS="$CPPFLAGS -I$7" fi @@ -38,7 +38,7 @@ AC_DEFUN([EX_CHECK_ALL], dnl remove the cached value and test again unset ac_cv_lib_$1_$2 AC_CHECK_LIB($1,$2,[ - unset ac_cv_header_`echo $3 | sed sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` + unset ac_cv_header_`echo $3 | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` AC_CHECK_HEADER($3,[EX_CHECK_STATE=YES],[]) ],[]) else @@ -65,7 +65,7 @@ AC_DEFUN([EX_CHECK_ALL], You can find also find an archive copy on - http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs + http://oss.oetiker.ch/rrdtool/pub/libs The last tested version of $4 is $5. @@ -289,6 +289,12 @@ if test "x$acx_pthread_ok" = xyes; then case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) x_rflag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) x_rflag="-D_REENTRANT";; + *-linux*) + if test x"$PTHREAD_CFLAGS" = "x-pthread"; then + # For Linux/gcc "-pthread" implies "-lpthread". We need, however, to make this explicit + # in PTHREAD_LIBS such that a shared library to be built properly depends on libpthread. + PTHREAD_LIBS="-lpthread $PTHREAD_LIBS" + fi;; esac AC_MSG_RESULT(${x_rflag}) if test "x$x_rflag" != xno; then @@ -437,7 +443,7 @@ AC_IEEE([out of the box], works, , , , PERLFLAGS="CCFLAGS=-DMUST_DISABLE_SIGFPE"], AC_MSG_ERROR([ Your Compiler does not do propper IEEE math ... Please find out how to -make IEEE math work with your compiler and let me know (oetiker@ee.ethz.ch). +make IEEE math work with your compiler and let me know (tobi@oetiker.ch). Check config.log to see what went wrong ... ]))])])])])])])])])]) @@ -471,4 +477,27 @@ $2]) CPPFLAGS="$save_CPPFLAGS" ]) +dnl a macro to add some color to the build process. +dnl CONFIGURE_PART(MESSAGE) + +AC_DEFUN([CONFIGURE_PART],[ +case $TERM in + # for the most important terminal types we directly know the sequences + xterm|xterm*|vt220|vt220*) + T_MD=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` + ;; + vt100|vt100*|cygwin) + T_MD=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` + T_ME=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` + ;; + *) + T_MD='' + T_ME='' + ;; +esac + AC_MSG_RESULT() + AC_MSG_RESULT([${T_MD}$1${T_ME}]) +]) +