aboutsummaryrefslogtreecommitdiff
path: root/rawhid/configure.ac
blob: f8a683a6e44dbb0c9cffe8dcb26c094e716eaaf5 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
dnl created with this version of autoconf
AC_PREREQ(2.53)

dnl Process this file with autoconf to produce a configure script.
AC_INIT([rawHID(e)],[0.0],[hans@eds.org],[rawhid])

dnl the obligatory license
AC_COPYRIGHT([2003 Hans-Christoph Steiner <hans@eds.org> GNU GPL 2.0 or higher])

dnl get cvs revision
AC_REVISION($Revision: 1.1 $)

dnl check and make sure the source files are actually there
AC_CONFIG_SRCDIR([rawjoystick.c])

dnl variables to substitute in Makefile.in
AC_SUBST(CC)
AC_SUBST(CFLAGS)
AC_SUBST(DEFS)
AC_SUBST(EXT)
AC_SUBST(INCLUDE)
AC_SUBST(LD)
AC_SUBST(LFLAGS)
AC_SUBST(STRIPFLAGS)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL

dnl check headers
AC_HEADER_STDC
AC_CHECK_HEADERS(SDL/SDL.h)
AC_CHECK_HEADERS(m_imp.h)
AC_CHECK_HEADERS(stddef.h)

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_ERROR_AT_LINE

LD=ld

dnl
dnl  OK, checks for machines are here now
dnl
if test `uname -s` = Linux; 
then
  CFLAGS="-O2 -funroll-loops -fomit-frame-pointer \
    -Wall -W -Wshadow -Wstrict-prototypes -Werror \
    -Wno-unused -Wno-parentheses -Wno-switch -g"
  INCLUDE="-I../../../pd/src -I. -I/usr/local/include"
  LFLAGS="-export_dynamic -shared"
  EXT=pd_linux	
  DEFS="-DUNIX -DLINUX"
  STRIPFLAGS="--strip-unneeded"
fi

dnl This should use '-bundle_loader /path/to/pd/bin/pd' instead of'-undefined suppress'
dnl then strip might do something
if test `uname -s` = Darwin; 
then
  CFLAGS="-O2"
  DEFS="-DUNIX -DMACOSX"
  EXT=pd_darwin
  INCLUDE="-I../../../pd/src -I. -I/usr/local/include"
  LD=cc
  LFLAGS="-bundle -undefined suppress -flat_namespace"
  STRIPFLAGS=
fi

if test `uname -s` = CYGWIN_NT-5.0;
then
  CFLAGS="-O2"
  DEFS=
  EXT=dll
  INCLUDE="-I/cygdrive/c/pd/src -I/usr/local/include"
  LFLAGS="-export_dynamic -shared"
  STRIPFLAGS=
fi

AC_CONFIG_FILES([Makefile])

AC_OUTPUT