Skip to content

Commit

Permalink
move NO_TERMH to config.h
Browse files Browse the repository at this point in the history
paaguti committed Dec 7, 2019
1 parent 055da04 commit 1ddc877
Showing 6 changed files with 23 additions and 11 deletions.
2 changes: 0 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
AM_CPPFLAGS += -DDIST_VERSION=\"191206\"
AM_CFLAGS =
AM_LDFLAGS =


OSRCS = cinfo.c fileio.c spawn.c ttyio.c tty.c ttykbd.c
SRCS = basic.c dir.c dired.c file.c line.c match.c paragraph.c \
random.c region.c search.c version.c window.c word.c \
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
aclocal
automake --add-missing
autoconf
autoreconf
9 changes: 6 additions & 3 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -36,9 +36,6 @@
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H

/* Define to 1 if you have the `ncurses' library (-lncurses). */
#undef HAVE_LIBNCURSES

/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H

@@ -134,6 +131,9 @@
/* Define to 1 if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H

/* Define to 1 if you have the <term.h> header file. */
#undef HAVE_TERM_H

/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

@@ -162,6 +162,9 @@
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK

/* Define if there is no term.h. */
#undef NO_TERMH

/* Name of package */
#undef PACKAGE

15 changes: 11 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
AC_PREREQ([2.69])
AC_INIT([mg3a], [191206], [paaguti@gmail.com])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([display.c])
dnl AC_CONFIG_SRCDIR([display.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
@@ -13,7 +13,11 @@ AC_PROG_INSTALL
AC_PROG_LN_S

# Checks for libraries.
AC_CHECK_LIB([ncurses], [baudrate])

AC_SEARCH_LIBS([beep],[ncursesw ncurses],[],
[ AC_MSG_ERROR([unable to find beep in NCURSES])]
)

# FIXME: Replace `main' with a function in `-ltermcap':
# AC_CHECK_LIB([termcap], [main])

@@ -132,10 +136,13 @@ AC_ARG_ENABLE([all],
[enable_all="${enableval:-yes}"],
[enable_all=no])
AS_IF(
[test "x$enable_all" == "xyes"],[AM_CPPFLAGS="-DALL"],[true]
[test "x$enable_all" == "xyes"],[AM_CPPFLAGS="-DALL"]
)


termh=no
AC_CHECK_HEADERS([term.h], [termh=yes])
AS_IF([test "x$termh" != "xyes"],
[AC_DEFINE([NO_TERMH], [1], [Define if there is no term.h.])])

AC_SUBST([AM_CPPFLAGS])
AC_CONFIG_FILES([Makefile])
4 changes: 4 additions & 0 deletions def.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/* ALL turns on all options */

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#ifdef ALL
#define DIRED
#define PREFIXREGION
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

#include "def.h"

char version[] = "Mg3a, version " DIST_VERSION;
char version[] = "Mg3a, version " VERSION;


/*

0 comments on commit 1ddc877

Please sign in to comment.