| 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 | |
|---|
| 30 | AC_PREREQ(2.59) |
|---|
| 31 | AC_INIT([LCD4Linux],[0.10.1-RC2],[lcd4linux-users@lists.sourceforge.net]) |
|---|
| 32 | AC_CONFIG_SRCDIR([lcd4linux.c]) |
|---|
| 33 | AM_INIT_AUTOMAKE([lcd4linux],0.10.1-RC2) |
|---|
| 34 | AM_CONFIG_HEADER(config.h) |
|---|
| 35 | |
|---|
| 36 | # Checks for programs. |
|---|
| 37 | AC_PROG_CC |
|---|
| 38 | AC_PROG_CPP |
|---|
| 39 | AC_PROG_INSTALL |
|---|
| 40 | AC_PROG_LN_S |
|---|
| 41 | AC_PROG_MAKE_SET |
|---|
| 42 | |
|---|
| 43 | # dmalloc |
|---|
| 44 | AM_WITH_DMALLOC |
|---|
| 45 | |
|---|
| 46 | # Checks for libraries. |
|---|
| 47 | AC_CHECK_LIB(m, log) |
|---|
| 48 | |
|---|
| 49 | # curses |
|---|
| 50 | sinclude(curses.m4) |
|---|
| 51 | AC_CHECK_CURSES |
|---|
| 52 | |
|---|
| 53 | # Checks for X11 |
|---|
| 54 | AC_PATH_X |
|---|
| 55 | AC_PATH_XTRA |
|---|
| 56 | # double-check for X11 |
|---|
| 57 | if 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 |
|---|
| 63 | fi |
|---|
| 64 | |
|---|
| 65 | # check for gd.h |
|---|
| 66 | AC_CHECK_HEADERS(gd/gd.h gd.h, [has_gd="true"; break], [has_gd="false"]) |
|---|
| 67 | |
|---|
| 68 | # check for sys/io.h (RouterBoard driver) |
|---|
| 69 | AC_CHECK_HEADERS(sys/io.h, [has_io_h="true"], [has_io_h="false"]) |
|---|
| 70 | |
|---|
| 71 | # check for usb.h |
|---|
| 72 | AC_CHECK_HEADERS(usb.h, [has_usb="true"], [has_usb="false"]) |
|---|
| 73 | |
|---|
| 74 | # check for luise.h |
|---|
| 75 | AC_CHECK_HEADERS(luise.h, [has_luise="true"], [has_luise="false"]) |
|---|
| 76 | |
|---|
| 77 | # check for serdisplib |
|---|
| 78 | AC_CHECK_HEADERS(serdisplib/serdisp.h, [has_serdisplib="true"], [has_serdisplib="false"]) |
|---|
| 79 | |
|---|
| 80 | # check for LCD-Linux |
|---|
| 81 | AC_CHECK_HEADERS(linux/lcd-linux.h linux/hd44780.h, [has_lcd_linux="true"], [has_lcd_linux="false"; break]) |
|---|
| 82 | |
|---|
| 83 | # check for python |
|---|
| 84 | AC_MSG_CHECKING(if python support is wanted) |
|---|
| 85 | AC_ARG_WITH(python, |
|---|
| 86 | [ --with-python enable python support [[default=no]]], |
|---|
| 87 | [AC_MSG_RESULT($withval)], [AC_MSG_RESULT(no)]) |
|---|
| 88 | if test "$with_python" = "yes"; then |
|---|
| 89 | sinclude(ac_python_devel.m4) |
|---|
| 90 | AC_PYTHON_DEVEL |
|---|
| 91 | fi |
|---|
| 92 | |
|---|
| 93 | # drivers |
|---|
| 94 | sinclude(drivers.m4) |
|---|
| 95 | |
|---|
| 96 | # plugins |
|---|
| 97 | sinclude(plugins.m4) |
|---|
| 98 | |
|---|
| 99 | # Checks for header files. |
|---|
| 100 | AC_HEADER_DIRENT |
|---|
| 101 | AC_HEADER_STDC |
|---|
| 102 | AC_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]) |
|---|
| 103 | AC_CHECK_HEADERS(asm/io.h) |
|---|
| 104 | AC_CHECK_HEADERS(linux/parport.h linux/ppdev.h) |
|---|
| 105 | AC_CHECK_HEADERS(asm/msr.h) |
|---|
| 106 | |
|---|
| 107 | # Checks for typedefs, structures, and compiler characteristics. |
|---|
| 108 | AC_C_CONST |
|---|
| 109 | AC_C_INLINE |
|---|
| 110 | AC_TYPE_OFF_T |
|---|
| 111 | AC_TYPE_PID_T |
|---|
| 112 | AC_TYPE_SIZE_T |
|---|
| 113 | AC_TYPE_SSIZE_T |
|---|
| 114 | AC_HEADER_TIME |
|---|
| 115 | AC_TYPE_UID_T |
|---|
| 116 | |
|---|
| 117 | |
|---|
| 118 | # Checks for library functions. |
|---|
| 119 | AC_FUNC_CLOSEDIR_VOID |
|---|
| 120 | AC_FUNC_ERROR_AT_LINE |
|---|
| 121 | AC_FUNC_FORK |
|---|
| 122 | |
|---|
| 123 | # uClibc has no getloadavg() |
|---|
| 124 | # AC_FUNC_GETLOADAVG sounds promising, but does not really work |
|---|
| 125 | #AC_FUNC_GETLOADAVG |
|---|
| 126 | |
|---|
| 127 | AC_PROG_GCC_TRADITIONAL |
|---|
| 128 | |
|---|
| 129 | # removed for uClibc compatibility |
|---|
| 130 | #AC_FUNC_MALLOC |
|---|
| 131 | #AC_FUNC_REALLOC |
|---|
| 132 | |
|---|
| 133 | AC_FUNC_SELECT_ARGTYPES |
|---|
| 134 | AC_TYPE_SIGNAL |
|---|
| 135 | AC_FUNC_STAT |
|---|
| 136 | AC_FUNC_STRFTIME |
|---|
| 137 | AC_FUNC_STRTOD |
|---|
| 138 | AC_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 | |
|---|
| 140 | AC_CONFIG_FILES([Makefile]) |
|---|
| 141 | AC_OUTPUT |
|---|