File: acinclude.m4

package info (click to toggle)
squeak-vm 1%3A4.10.2.2614-4.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 13,284 kB
  • ctags: 15,344
  • sloc: ansic: 75,096; cs: 11,191; objc: 5,494; sh: 3,170; asm: 1,533; cpp: 449; pascal: 372; makefile: 366; awk: 103
file content (47 lines) | stat: -rw-r--r-- 1,219 bytes parent folder | download | duplicates (8)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
AC_DEFUN([AC_LANGINFO_CODESET], [
  AC_CACHE_CHECK([for nl_langinfo and CODESET], ac_cv_langinfo_codeset,
    [AC_TRY_LINK([#include <langinfo.h>], [char *cs= nl_langinfo(CODESET);],
      ac_cv_langinfo_codeset=yes,
      ac_cv_langinfo_codeset=no)
    ])
  if test $ac_cv_langinfo_codeset = yes; then
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
  fi
  AC_SUBST(HAVE_LANGINFO_CODESET)
])

AC_DEFUN([AC_ICONV], [
  AC_CHECK_FUNC(_dyld_present,[],[
    AC_CHECK_LIB(iconv, iconv_open, ac_cv_iconv=yes, [
      AC_CHECK_LIB(iconv, libiconv_open, ac_cv_iconv=yes, ac_cv_iconv=no)
    ])
    if test $ac_cv_iconv = yes; then
      LIBS="$LIBS -liconv"
    fi
  ])
])

AC_ARG_ENABLE(iconv,
[  --disable-iconv         disable iconv support [default=enabled]],
  [with_iconv="$withval"],
  [with_iconv="yes"])


case $host_os in
  darwin*) LIBS="$LIBS -framework CoreFoundation -framework CoreServices";;
  *)       ;;
esac

if test "$with_iconv" = "yes"; then
  AC_CHECK_HEADERS(iconv.h)
  AC_ICONV
  AC_LANGINFO_CODESET
else
  AC_MSG_RESULT([******** disabling iconv])
fi

AC_CHECK_FUNC(nanosleep, [
  AC_DEFINE(HAVE_NANOSLEEP, 1)
  AC_SUBST(HAVE_NANOSLEEP)
])