[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH 1/8] add support for gnulib
From: |
Mike Frysinger |
Subject: |
[Nano-devel] [PATCH 1/8] add support for gnulib |
Date: |
Sat, 6 Feb 2016 19:03:54 -0500 |
On a current Linux system, the size of nano is unchanged.
We start off with importing only a few modules, although
we don't yet delete the fallback logic for them.
---
.gitignore | 7 +++++++
Makefile.am | 2 +-
autogen.sh | 12 ++++++++++++
configure.ac | 7 +++++++
m4/Makefile.am | 2 +-
src/Makefile.am | 4 ++--
6 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index fd20327..b3cd19b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ core
/ABOUT-NLS
/INSTALL
/aclocal.m4
+/ar-lib
/autom4te.cache
/compile
/config.cache
@@ -30,5 +31,11 @@ core
/mkinstalldirs
/stamp-h1
+# gnulib entries
+/lib/
+/m4/.gitignore
+/m4/gnulib-cache.m4
+/snippet/
+
/nano.spec
/src/nano
diff --git a/Makefile.am b/Makefile.am
index 41de135..9560008 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
## $Id$
AUTOMAKE_OPTIONS = gnu no-dependencies
-SUBDIRS = doc m4 po src
+SUBDIRS = doc lib m4 po src
EXTRA_DIST = ChangeLog.pre-2.1 README.SVN UPGRADE nano.spec
diff --git a/autogen.sh b/autogen.sh
index 9fc3145..e3dd617 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,16 @@
#!/bin/sh
# Generate configure & friends for CVS users.
+modules="
+ strcase
+ strcasestr-simple
+ strnlen
+"
+if [ -n "${GNULIB_SRCDIR}" ]; then
+ rm -rf lib
+ "${GNULIB_SRCDIR}"/gnulib-tool \
+ --import \
+ ${modules}
+fi
+
autoreconf -f -i -s
diff --git a/configure.ac b/configure.ac
index 2df6404..fd121ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,10 +30,16 @@ dnl Make sure the ONCE macros are available.
AC_PREREQ(2.61)
+dnl Lie about gnulib features we don't use to speed up & shrink down.
+
+gl_cv_func_printf_infinite_long_double=yes
+
dnl Checks for programs.
AC_GNU_SOURCE
AC_PROG_CC
+gl_EARLY
+gl_INIT
AC_PROG_LN_S
AC_ISC_POSIX
AC_SYS_LARGEFILE
@@ -690,6 +696,7 @@ doc/man/Makefile
doc/man/fr/Makefile
doc/syntax/Makefile
doc/texinfo/Makefile
+lib/Makefile
m4/Makefile
po/Makefile.in
src/Makefile
diff --git a/m4/Makefile.am b/m4/Makefile.am
index ab8542c..ba41afd 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -1,5 +1,5 @@
EXTRA_DIST = ac_define_dir.m4 codeset.m4 gettext.m4 glib-2.0.m4 \
- glibc21.m4 iconv.m4 intdiv0.m4 inttypes_h.m4 \
+ glibc21.m4 gnulib-cache.m4 iconv.m4 intdiv0.m4 inttypes_h.m4 \
inttypes.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 \
lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 \
stdint_h.m4 uintmax_t.m4 ulonglong.m4
diff --git a/src/Makefile.am b/src/Makefile.am
index df65845..0e89a51 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
+AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
-I$(top_builddir)/lib -I$(top_srcdir)/lib
bin_PROGRAMS = nano
nano_SOURCES = browser.c \
@@ -19,7 +19,7 @@ nano_SOURCES = browser.c \
utils.c \
winio.c
-nano_LDADD = @GLIB_LIBS@ @LIBINTL@
+nano_LDADD = @GLIB_LIBS@ @LIBINTL@ ../lib/libgnu.a
install-exec-hook:
cd $(DESTDIR)$(bindir) && rm -f rnano && $(LN_S) nano rnano
--
2.6.2
- [Nano-devel] [PATCH 1/8] add support for gnulib,
Mike Frysinger <=
- [Nano-devel] [PATCH 8/8] drop wchar.h/wctype.h/stdarg.h checks, Mike Frysinger, 2016/02/06
- [Nano-devel] [PATCH 6/8] assume getopt_long support is always available, Mike Frysinger, 2016/02/06
- [Nano-devel] [PATCH 3/8] drop getdelim/getline fallback functions, Mike Frysinger, 2016/02/06
- [Nano-devel] [PATCH 4/8] drop isblank/iswblank fallback functions, Mike Frysinger, 2016/02/06
- [Nano-devel] [PATCH 5/8] assume regex.h support is always available, Mike Frysinger, 2016/02/06
- [Nano-devel] [PATCH 2/8] drop various str fallback functions, Mike Frysinger, 2016/02/06
- [Nano-devel] [PATCH 7/8] drop glib fallback for snprintf/vsnprintf, Mike Frysinger, 2016/02/06
- Re: [Nano-devel] [PATCH 1/8] add support for gnulib, Mike Frysinger, 2016/02/06