File: libm.m4

package info (click to toggle)
enca 1.13-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,440 kB
  • sloc: sh: 11,125; ansic: 10,330; xml: 2,926; makefile: 698; perl: 232
file content (27 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Check for math library.  Taken from libtool.m4.
## Defines:
## LIBM
## LIBS (adds library when needed)
AC_DEFUN([ye_CHECK_LIBM],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl

case "$target" in
NONE) yeti_libm_target="$host" ;;
*) yeti_libm_target="$target" ;;
esac

LIBM=
case "$yeti_libm_target" in
*-*-beos* | *-*-cygwin*)
  # These system don't have libm
  ;;
*-ncr-sysv4.3*)
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  AC_CHECK_LIB(m, sqrt, LIBM="$LIBM -lm")
  ;;
*)
  AC_CHECK_LIB(m, sqrt, LIBM="-lm")
  ;;
esac
AC_SUBST(LIBM)
LIBS="$LIBS $LIBM"])