aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2001-08-30 14:05:26 +0000
committerYves Duret <yduret@mandriva.com>2001-08-30 14:05:26 +0000
commitba01e1e135b47b711dd5cd6c4294f2531aa0e45f (patch)
tree5e38bbf4567937832494df56912af99dea035531 /configure.in
parentd9efcdea23d47d81c02f6bbf0e0e79cc59975a99 (diff)
downloadtransfugdrake-ba01e1e135b47b711dd5cd6c4294f2531aa0e45f.tar
transfugdrake-ba01e1e135b47b711dd5cd6c4294f2531aa0e45f.tar.gz
transfugdrake-ba01e1e135b47b711dd5cd6c4294f2531aa0e45f.tar.bz2
transfugdrake-ba01e1e135b47b711dd5cd6c4294f2531aa0e45f.tar.xz
transfugdrake-ba01e1e135b47b711dd5cd6c4294f2531aa0e45f.zip
stolen from hexedit
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in68
1 files changed, 68 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..fe0d4b9
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,68 @@
+dnl Autoconfigure input file for hexedit
+dnl
+dnl Process this file with autoconf to produce a configure script.
+dnl
+
+AC_INIT(hexedit.c)
+AC_CONFIG_HEADERS(config.h)
+
+define(TheVERSION, 1.2.1)
+
+PRODUCT=hexedit
+VERSION=TheVERSION
+INCL=hexedit.h
+SRCS="hexedit.c display.c mark.c page.c file.c interact.c misc.c search.c"
+OTHER="COPYING Changes TODO install-sh configure config.h.in hexedit.1 hexedit-TheVERSION.lsm Makefile.in configure.in Makefile-build.in"
+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.
+AC_CHECK_LIB(curses, initscr, LIBS="$LIBS -lcurses",
+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.
+AC_SYS_LARGEFILE
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_STAT
+AC_HEADER_SYS_WAIT
+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
+
+AC_CHECK_DECLS([dirname, basename, memrchr, memmem, memrmem], , ,
+$ac_includes_default
+#if HAVE_LIBGEN_H
+#include <libgen.h>
+#endif
+)
+
+AC_OUTPUT(Makefile Makefile-build)