root/branches/0.10.1/configure.in

Revision 800, 3.8 kB (checked in by michael, 20 months ago)

backported r799 from trunk

  • Property svn:keywords set to Id URL
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4
5# $Id$
6# $URL$
7
8
9# LCD4Linux autoconf script
10#
11# Copyright (C) 1999, 2000, 2001, 2002, 2003 Michael Reinelt <reinelt@eunet.at>
12# Copyright (C) 2004, 2005, 2006, 2007 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
13#
14# This file is part of LCD4Linux.
15#
16# LCD4Linux is free software; you can redistribute it and/or modify
17# it under the terms of the GNU General Public License as published by
18# the Free Software Foundation; either version 2, or (at your option)
19# any later version.
20#
21# LCD4Linux is distributed in the hope that it will be useful,
22# but WITHOUT ANY WARRANTY; without even the implied warranty of
23# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24# GNU General Public License for more details.
25#
26# You should have received a copy of the GNU General Public License
27# along with this program; if not, write to the Free Software
28# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29
30AC_PREREQ(2.59)
31AC_INIT([LCD4Linux],[0.10.1-RC2],[lcd4linux-users@lists.sourceforge.net])
32AC_CONFIG_SRCDIR([lcd4linux.c])
33AM_INIT_AUTOMAKE([lcd4linux],0.10.1-RC2)
34AM_CONFIG_HEADER(config.h)
35
36# Checks for programs.
37AC_PROG_CC
38AC_PROG_CPP
39AC_PROG_INSTALL
40AC_PROG_LN_S
41AC_PROG_MAKE_SET
42
43# dmalloc
44AM_WITH_DMALLOC
45
46# Checks for libraries.
47AC_CHECK_LIB(m, log)
48
49# curses
50sinclude(curses.m4)
51AC_CHECK_CURSES
52
53# Checks for X11
54AC_PATH_X
55AC_PATH_XTRA
56# double-check for X11
57if test "$no_x" != "yes"; then
58   AC_CHECK_HEADERS(X11/Xlib.h X11/Xutil.h, [no_x="$no_x"], [no_x="yes"])
59   if test "$no_x" = "yes"; then
60      AC_MSG_WARN([configure thinks X11 is available while it is *not*])
61      AC_MSG_WARN([maybe someone wants to fix autoconf's AC PATH XTRA])
62   fi
63fi
64
65# check for gd.h
66AC_CHECK_HEADERS(gd/gd.h gd.h, [has_gd="true"; break], [has_gd="false"])
67
68# check for sys/io.h (RouterBoard driver)
69AC_CHECK_HEADERS(sys/io.h, [has_io_h="true"], [has_io_h="false"])
70
71# check for usb.h
72AC_CHECK_HEADERS(usb.h, [has_usb="true"], [has_usb="false"])
73
74# check for luise.h
75AC_CHECK_HEADERS(luise.h, [has_luise="true"], [has_luise="false"])
76
77# check for serdisplib
78AC_CHECK_HEADERS(serdisplib/serdisp.h, [has_serdisplib="true"], [has_serdisplib="false"])
79
80# check for LCD-Linux
81AC_CHECK_HEADERS(linux/lcd-linux.h linux/hd44780.h, [has_lcd_linux="true"], [has_lcd_linux="false"; break])
82
83# check for python
84AC_MSG_CHECKING(if python support is wanted)
85AC_ARG_WITH(python,
86[  --with-python           enable python support [[default=no]]],
87[AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)])
88if test "$with_python" = "yes"; then
89  sinclude(ac_python_devel.m4)
90  AC_PYTHON_DEVEL
91fi
92
93# drivers
94sinclude(drivers.m4)
95
96# plugins
97sinclude(plugins.m4)
98
99# Checks for header files.
100AC_HEADER_DIRENT
101AC_HEADER_STDC
102AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/vfs.h syslog.h termios.h unistd.h])
103AC_CHECK_HEADERS(asm/io.h)
104AC_CHECK_HEADERS(linux/parport.h linux/ppdev.h)
105AC_CHECK_HEADERS(asm/msr.h)
106
107# Checks for typedefs, structures, and compiler characteristics.
108AC_C_CONST
109AC_C_INLINE
110AC_TYPE_OFF_T
111AC_TYPE_PID_T
112AC_TYPE_SIZE_T
113AC_TYPE_SSIZE_T
114AC_HEADER_TIME
115AC_TYPE_UID_T
116
117
118# Checks for library functions.
119AC_FUNC_CLOSEDIR_VOID
120AC_FUNC_ERROR_AT_LINE
121AC_FUNC_FORK
122
123# uClibc has no getloadavg()
124# AC_FUNC_GETLOADAVG sounds promising, but does not really work
125#AC_FUNC_GETLOADAVG
126
127AC_PROG_GCC_TRADITIONAL
128
129# removed for uClibc compatibility
130#AC_FUNC_MALLOC
131#AC_FUNC_REALLOC
132
133AC_FUNC_SELECT_ARGTYPES
134AC_TYPE_SIGNAL
135AC_FUNC_STAT
136AC_FUNC_STRFTIME
137AC_FUNC_STRTOD
138AC_CHECK_FUNCS([dup2 floor gethostbyname gettimeofday memmove memset pow putenv regcomp select socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol strtoul uname])
139
140AC_CONFIG_FILES([Makefile])
141AC_OUTPUT
Note: See TracBrowser for help on using the browser.