aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
blob: 5b5e72eca87a9cc7586cd1cbe5fb90a1318f33a9 (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
dnl Autoconfigure input file for hexedit
dnl
dnl Process this file with autoconf to produce a configure script.
dnl

AC_INIT(transfugdrake.c)
dnl AC_CONFIG_HEADERS(config.h)

define(TheVERSION, 0.1)

PRODUCT=transfugdrake
VERSION=TheVERSION
INCL=hexedit.h
SRCS="transfudrake.c"
OTHER="COPYING AUTHORS README TODO  configure config.h.in  Makefile.in configure.in Makefile-build.in transfugdrake"
AC_SUBST(PRODUCT)
AC_SUBST(VERSION)
AC_SUBST(INCL)
AC_SUBST(SRCS)
AC_SUBST(OTHER)

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

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL

dnl Checks for libraries.
dnl AC_CHECK_LIB(curses, initscr, LIBS="$LIBS -lcurses",
dnl AC_CHECK_LIB(ncurses, initscr, LIBS="$LIBS -lncurses"))

dnl This test must come as early as possible after the compiler configuration
dnl tests, because the choice of the file model can (in principle) affect
dnl whether functions and headers are available, whether they work, etc.
dnl AC_SYS_LARGEFILE

dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_STAT
AC_HEADER_SYS_WAIT
dnl AC_CHECK_HEADERS(fcntl.h unistd.h libgen.h)

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

dnl Checks for library functions.
AC_CHECK_FUNCS(memcmp memmem memrmem memrchr strdup strerror basename)
if test $ac_cv_func_basename = no; then
  # basename not in the default libraries. See if it's elsewhere
  AC_CHECK_LIB(gen, basename, [AC_DEFINE(HAVE_BASENAME)
    LIBS="$LIBS -lgen"])
fi

dnl AC_CHECK_DECLS([dirname, basename, memrchr, memmem, memrmem], , , 
dnl $ac_includes_default
dnl #if HAVE_LIBGEN_H
dnl #include <libgen.h>
dnl #endif
dnl )

AC_OUTPUT(Makefile Makefile-build)