From 10fba98c886111aad44dc1b0a595453e1a7eba3b Mon Sep 17 00:00:00 2001 From: mmdolze Date: Sat, 6 Jun 2009 16:01:38 +0000 Subject: [PATCH] Check for getopt instead of getopt_long to decide if the system has a working getopt implementation (we don't use getopt_long at all). Include {topdir}/shared for the clients so they pull in our included getopt.h. This fixes bulding on systems which have getopt(), but no getopt.h. --- ChangeLog | 1 + clients/lcdexec/Makefile.am | 2 +- clients/lcdproc/Makefile.am | 2 +- clients/lcdvc/Makefile.am | 2 +- configure.in | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81b5cea..8a7240a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -73,6 +73,7 @@ v.0.5dev (ongoing development) + new driver imonlcd for SoundGraph iMON LCD (Dean Harding, Jonathan Kyler) * MtxOrb driver: Fix backlight for old firmware * Add checks for null pointer / failed malloc to menu code + * lcdproc, lcdexec, lcdvc clients: Use our included getopt.h v.0.5.2 * fix switching on/off the Load screen in lcdproc client using the menu diff --git a/clients/lcdexec/Makefile.am b/clients/lcdexec/Makefile.am index 09b24bd..e405c39 100644 --- a/clients/lcdexec/Makefile.am +++ b/clients/lcdexec/Makefile.am @@ -8,7 +8,7 @@ lcdexec_SOURCES = lcdexec.c menu.c menu.h lcdexec_LDADD = ../../shared/libLCDstuff.a -AM_CPPFLAGS = -I$(top_srcdir) -DSYSCONFDIR=\"$(sysconfdir)\" -DPIDFILEDIR=\"$(pidfiledir)\" +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -DSYSCONFDIR=\"$(sysconfdir)\" -DPIDFILEDIR=\"$(pidfiledir)\" EXTRA_DIST = $(sysconf_DATA) diff --git a/clients/lcdproc/Makefile.am b/clients/lcdproc/Makefile.am index 1bc324d..1141367 100644 --- a/clients/lcdproc/Makefile.am +++ b/clients/lcdproc/Makefile.am @@ -12,7 +12,7 @@ if DARWIN AM_LDFLAGS = -framework CoreFoundation -framework IOKit endif -AM_CPPFLAGS = -I$(top_srcdir) -DSYSCONFDIR=\"$(sysconfdir)\" -DPIDFILEDIR=\"$(pidfiledir)\" +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -DSYSCONFDIR=\"$(sysconfdir)\" -DPIDFILEDIR=\"$(pidfiledir)\" EXTRA_DIST = $(sysconf_DATA) diff --git a/clients/lcdvc/Makefile.am b/clients/lcdvc/Makefile.am index 467f5a2..4304782 100644 --- a/clients/lcdvc/Makefile.am +++ b/clients/lcdvc/Makefile.am @@ -12,7 +12,7 @@ if DARWIN AM_LDFLAGS = -framework CoreFoundation -framework IOKit endif -AM_CPPFLAGS = -I$(top_srcdir) -DSYSCONFDIR=\"$(sysconfdir)\" -DPIDFILEDIR=\"$(pidfiledir)\" +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -DSYSCONFDIR=\"$(sysconfdir)\" -DPIDFILEDIR=\"$(pidfiledir)\" #AM_CFLAGS = -g -O0 #AM_LDFLAGS = -g diff --git a/configure.in b/configure.in index c034d85..e694edb 100644 --- a/configure.in +++ b/configure.in @@ -190,7 +190,7 @@ AC_CHECK_FUNCS(select socket strdup strerror strtol uname cfmakeraw snprintf) dnl Many people on non-GNU/Linux systems don't have getopt AC_CONFIG_LIBOBJ_DIR(shared) -AC_CHECK_FUNC(getopt_long, +AC_CHECK_FUNC(getopt, [ AC_ARG_WITH(included-getopt, [AS_HELP_STRING([--with-included-getopt], [Use the included getopt rather than glibc's])],