File: configure.ac

package info (click to toggle)
srg 1.3.5-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,956 kB
  • ctags: 776
  • sloc: sh: 9,073; cpp: 3,383; ansic: 563; makefile: 74; php: 57; yacc: 35; lex: 30
file content (76 lines) | stat: -rw-r--r-- 2,135 bytes parent folder | download
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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT([SRG], [1.3.5], [matt@mattb.net.nz])
AC_CONFIG_SRCDIR(include/srg.h)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AM_INIT_AUTOMAKE(dist-bzip2)
AC_CANONICAL_HOST

AC_DEFINE([HAVE_GETOPT_LONG], [], [Defined when getopt_long is available])

# Setup architecture specific stuff
case "x${host_os}" in
    xfreebsd*)
        # FreeBSD
        AC_MSG_NOTICE([Setting FreeBSD include/library paths])
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
        LDFLAGS="$LDFLAGS -L/usr/local/lib"
        ;;
    *)
        AC_MSG_NOTICE([No platform specific include/library paths set])
        ;;
esac

# Autoheader Macros
AH_VERBATIM([_GNU_SOURCE],
                       [/* Enable GNU extensions on systems that have them.  */
                        #ifndef _GNU_SOURCE
                        # define _GNU_SOURCE
                        #endif])

# Checks for programs.
AC_PROG_YACC
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LEX
AC_PROG_INSTALL
AC_PROG_LIBTOOL

# Check libraries

# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/socket.h unistd.h])

# Check for getopt header
AC_CHECK_HEADER([getopt.h], :, [AC_MSG_ERROR([*** Could not find getopt.h!])])

# Check for getopt_long, including gnugetopt if needed
AC_CHECK_FUNC([getopt_long], AC_DEFINE([HAVE_GETOPT_LONG]),
    AC_CHECK_LIB([gnugetopt],[getopt_long], ,
                AC_MSG_ERROR([*** getopt_long not available!])))

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

# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_MMAP
AC_FUNC_STAT
AC_CHECK_FUNCS([bzero gethostbyaddr gethostbyname inet_ntoa memset mkdir munmap rmdir strcasecmp strchr strdup strerror strrchr strstr])

AC_SUBST(ac_aux_dir)

AC_CONFIG_FILES([Makefile libconfig/Makefile src/Makefile])
AC_OUTPUT