Remove the "** FIXME: THIS DOES NOT ACTUALLY WORK YET" lines.
[synfig.git] / ETL / trunk / config / ETL.m4
1 # ETL M4 Macro
2 # For GNU Autotools
3 # $Id$
4 #
5 # By Robert B. Quattlebaum Jr. <darco@users.sf.net>
6 #
7
8 AC_DEFUN([ETL_DEPS],
9 [
10         AC_C_BIGENDIAN
11         
12         AC_CHECK_LIB(user32, main)
13         AC_CHECK_LIB(kernel32, main)
14         AC_CHECK_LIB(pthread, main)
15                 
16         AC_HEADER_STDC
17         
18         AC_CHECK_HEADERS(pthread.h)
19         AC_CHECK_HEADERS(sched.h)
20         AC_CHECK_HEADERS(sys/times.h)
21         AC_CHECK_HEADERS(sys/time.h)
22         AC_CHECK_HEADERS(unistd.h)
23         AC_CHECK_HEADERS(windows.h)
24         AC_CHECK_FUNCS([pthread_create])
25         AC_CHECK_FUNCS([pthread_rwlock_init])
26         AC_CHECK_FUNCS([pthread_yield])
27         AC_CHECK_FUNCS([sched_yield])
28         AC_CHECK_FUNCS([CreateThread])
29         AC_CHECK_FUNCS([__clone])
30         AC_CHECK_FUNCS([QueryPerformanceCounter])
31         
32         AC_CHECK_FUNCS([gettimeofday])
33         AC_CHECK_FUNCS([sscanf])
34         AC_CHECK_FUNCS([vsscanf])
35         AC_CHECK_FUNCS([vsprintf])
36         AC_CHECK_FUNCS([vasprintf])
37         AC_CHECK_FUNCS([vsnprintf],[],[
38                 AC_CHECK_FUNC([_vsnprintf],[
39                         AC_DEFINE(vsnprintf,_vsnprintf,[define if the vsnprintf function is mangled])
40                         AC_DEFINE(HAVE_VSNPRINTF,1)
41                 ])
42         ])
43 ])
44
45 AC_DEFUN([USING_ETL],
46 [
47         AC_ARG_WITH(ETL-includes,
48         [  --with-ETL-includes    Specify location of ETL headers],[
49         CXXFLAGS="$CXXFLAGS -I$withval"
50         ])
51
52         AC_PATH_PROG(ETL_CONFIG,ETL-config,no)
53
54         if test "$ETL_CONFIG" = "no"; then
55                 no_ETL_config="yes"
56                 $2
57         else
58                 AC_MSG_CHECKING([if $ETL_CONFIG works])
59                 if $ETL_CONFIG --libs >/dev/null 2>&1; then
60                         ETL_VERSION="`$ETL_CONFIG --version`"
61                         AC_MSG_RESULT([yes, $ETL_VERSION])
62                         CXXFLAGS="$CXXFLAGS `$ETL_CONFIG --cxxflags`"
63                         $1
64                 else
65                         AC_MSG_RESULT(no)
66                         no_ETL_config="yes"
67                         $2
68                 fi
69         fi
70
71         ETL_DEPS
72 ])
73
74