Re: Bison

2011-01-12 Thread David Fang
$YACC is really bison or yacc, not just relying on the program name. automake also provides a helper script 'ylwrap' to deal with yacc/bison compilations and do some file renaming. Fang David Fang http://www.csl.cornell.edu/~fang/ http://www.achronix.com/ dnl @synopsis HACKT_ARG_VAR_YACC dnl

Re: echo vs. printf regression (darwin8)

2010-08-16 Thread David Fang
On 08/16/2010 04:27 PM, Peter O'Gorman wrote: On 08/16/2010 07:37 AM, Paolo Bonzini wrote: On 08/16/2010 12:54 AM, David Fang wrote: Actually, 'pogma' pointed out that this comes from the autoconf macros in libtool.m4, near AC_MSG_CHECKING([how to print strings]). I'm using libtool-2.2.10

echo vs. printf regression (darwin8)

2010-08-15 Thread David Fang
single quote protection). I don't know yet whether that is forward-compatible with newer versions of Bourne shell. Don't recall which version of autoconf broke this, betweem 2.63 and latest. Fang David Fang http://www.csl.cornell.edu/~fang/ http://www.achronix.com/

Re: echo vs. printf regression (darwin8)

2010-08-15 Thread David Fang
On 08/15/2010 06:59 PM, David Fang wrote: The ECHO that is chosen by autoconf on darwin8 (printf %s\n) is buggy: fangism % printf %s\n foo foonfangism% printf '%s\n' foo foo Must be due to the version of the Bourne shell (2.05b). Failure is similar with sh-3.2. The 'correct' value of ECHO

Re: echo vs. printf regression (darwin8)

2010-08-15 Thread David Fang
On 08/15/2010 06:59 PM, David Fang wrote: The ECHO that is chosen by autoconf on darwin8 (printf %s\n) is buggy: fangism % printf %s\n foo foonfangism% printf '%s\n' foo foo Must be due to the version of the Bourne shell (2.05b). Failure is similar with sh-3.2. The 'correct' value of ECHO

Re: echo vs. printf regression (darwin8)

2010-08-15 Thread David Fang
Actually, 'pogma' pointed out that this comes from the autoconf macros in libtool.m4, near AC_MSG_CHECKING([how to print strings]). I'm using libtool-2.2.10 right now. Fang On 08/15/2010 06:59 PM, David Fang wrote: Hi, The ECHO that is chosen by autoconf on darwin8 (printf %s\n) is buggy

Re: getting the file extension of a shared object

2009-06-22 Thread David Fang
? libltdl's lt_dlopenext() loads modules given the base name without the file extension, which takes some pain out of portability. Fang David Fang http://www.csl.cornell.edu/~fang/ http://www.achronix.com/ ___ Autoconf mailing list Autoconf@gnu.org http

RE: multiple inclusion guard for config.h

2007-01-21 Thread David Fang
On Saturday, January 20, 2007 @ 5:50p, Ed Hartnett wrote: David Byron wrote: Any suggestions how? I've seen people write scripts to modify/rename config.h but that seems overkill in this case. How about something like: #ifndef MY_CONFIG_INCLUDED #include ../my/config.h

Re: using builddir/srcdir at configure time

2006-11-25 Thread David Fang
? I can't help but guess, It almost looks like you want to use them like so (in automake): AM_CPPFLAGS = -I$(top_builddir)/whatever -I$(top_srcdir)/whatever If you're using those variables for something else other than compiling, it may just be simpler to use what's available at make-time. David

Re: Testing for compiler capabilities

2006-08-22 Thread David Fang
New since gcc-4.0. dnl Define HAVE_ATTRIBUTE_VISIBILITY_HIDDEN if supported. dnl Define HAVE_ATTRIBUTE_VISIBILITY_DEFAULT if supported. dnl dnl @category Cxx dnl @version 2006-05-08 dnl @author David Fang [EMAIL PROTECTED] dnl @license AllPermissive dnl AC_DEFUN([FANG_CXX_ATTRIBUTE_VISIBILITY

Re: Testing for compiler capabilities

2006-08-22 Thread David Fang
On Tue, 22 Aug 2006, Jan Engelhardt wrote: Hi David, I am afraid using -Werror does not work, it really needs -fvis.. on the command line: $ cat x.c int __attribute__((visibility(hidden))) mx(void) { return 1337; } $ cc -c x.c -Wall -Werror (No error) $ cc -c x.c -Wall -Werror

Re: AC_CHECK_SIZEOF failing on undefined HAVE_STDINT_H with -Werror

2006-08-15 Thread David Fang
by David Fang in http://lists.gnu.org/archive/html/autoconf/2006-08/msg00045.html. * doc/autoconf.texi (Header Templates, Default Includes): (Particular Functions, Generic Functions, Header Portability): (Particular Headers, Generic Headers, Generic Declarations, Guidelines

AC_CHECK_SIZEOF failing on undefined HAVE_STDINT_H with -Werror

2006-08-14 Thread David Fang
Hi autoconf-ers, I'm having a problem configuring a project using -Werror because tests for AC_CHECK_SIZEOF() all die in the following manner (excerpt of config.log): (These tests fail on FreeBSD 4.3 which doesn't have stdint.h. The AC_CHECK_HEADERS([stdint.h]) confirms this during

Re: CC=cc ./configure or ./configure CC=cc

2006-08-08 Thread David Fang
Andreas Schwab wrote: Try ./config.status --version. Thanks! But how could I have guessed this functionality is available under this option? $ ./config.status --help ... -V, --versionprint version number, then exit ... Should better say: -V, --versionprint version number

Re: Different types of configure for same program

2006-08-02 Thread David Fang
Sometimes I wish to call configure with different flags. For example: ./configure CXXFLAGS=-ggdb -Wall -std=c++98 or ./configure CXXFLAGS=-O3 -funroll-loops --with-gmp or some more like these. Having to be writing these all the time is cumbersome and error-prone since for debugging or for

Re: AC_CHECK_FILES on /dev/stdin

2006-03-31 Thread David Fang
Sorry for the confusion, I meant that the need to be *identical*, not just derivable from the other, because I'm containing their objects (value), not references. struct foo { ifstream _stream; }; I think you are making a design bug. An iostream is generally not copyable, so you

Re: AC_CHECK_FILES on /dev/stdin

2006-03-30 Thread David Fang
I naively tried to use AC_CHECK_FILE(S) on /dev/stdin /dev/stdout and /dev/stderr to detect their presence, but the test result is 'no' for these 'files'. These are not real devices. You may find entries in /dev, which suggest otherwise, but look closely: if they exist at all, they

Re: AC_CHECK_FILES on /dev/stdin

2006-03-30 Thread David Fang
To give a little more context for what I'm trying to do in C++ (experimentally): I've discovered that std::ifstream foo(/dev/stdin) results in a file stream that works just like cin, likewise for stdout, etc... Just like in standard C, one could use stdin, stdout, stderr as FILE*,

Re: AC_CHECK_FILES on /dev/stdin

2006-03-30 Thread David Fang
Whether /dev/std{in,out,err} are devices, symlinks, or even present is going to be system dependent. They're real character devices on NetBSD: $ ls -l /dev/std{in,out,err} crw-rw-rw- 1 root wheel 22, 2 Feb 19 11:01 /dev/stderr crw-rw-rw- 1 root wheel 22, 0 Feb 19 11:01 /dev/stdin

Re: AC_CHECK_FILES on /dev/stdin

2006-03-30 Thread David Fang
Yes (without having tested it). A couple of very minor nits inline: AC_DEFUN([AC_CXX_STD_IFSTREAM_DEV_STDIN], Please do not name your private macro with `AC_*'. That's the name space reserved for macros from Autoconf proper. It's commonly seen to use ones initials or a project prefix

AC_CHECK_FILES on /dev/stdin

2006-03-29 Thread David Fang
Hi, I naively tried to use AC_CHECK_FILE(S) on /dev/stdin /dev/stdout and /dev/stderr to detect their presence, but the test result is 'no' for these 'files'. The result is 'yes', however, for /dev/null. Is there a more appropriate test for the presence of these special files? or

Re: Universal Binaries

2006-02-17 Thread David Fang
(manual section) came out of this thread. David Fang ___ Autoconf mailing list Autoconf@gnu.org http://lists.gnu.org/mailman/listinfo/autoconf

Re: Autoconf and CVS

2006-01-04 Thread David Fang
to do with AM_MAINTAINER_MODE. (And, as I said in my post to another sub-thread, forget about AM_MAINTAINER_MODE, too.) David Fang ___ Autoconf mailing list Autoconf@gnu.org http://lists.gnu.org/mailman/listinfo/autoconf

Re: Autoconf and CVS

2005-12-24 Thread David Fang
-generate a Makefile before maintainer-cleaning, which is extremely rare (for me). David Fang ___ Autoconf mailing list Autoconf@gnu.org http://lists.gnu.org/mailman/listinfo/autoconf

Re: Autoconf and CVS

2005-12-24 Thread David Fang
aclocal $ACLOCAL_FLAGS -I config (autoheader --version) /dev/null /dev/null 21 autoheader automake --copy --add-missing --verbose --gnu $am_opt autoconf 8- HTH, David Fang ___ Autoconf mailing list Autoconf@gnu.org

Re: AC_CONFIG_HEADERS vs. AC_CONFIG_FILES

2005-12-18 Thread David Fang
that there will be no foo.h: foo.h.tmp dependency automatically generated to auto-reconf, which would be nice. It's not difficult to add the rule in the Makefile.am manually, but it's just one more thing to remember (and explain to someone reading through my files). I'll play around some more... David Fang

Re: AC_CONFIG_HEADERS vs. AC_CONFIG_FILES

2005-12-17 Thread David Fang
). Is this what you meant? Admittedly, I'm sure how to use a stamp-file in this case (I've only hacked my own stamp schemes for completely different situations in Makefiles). David Fang ___ Autoconf mailing list Autoconf@gnu.org http

Re: AC_CONFIG_HEADERS vs. AC_CONFIG_FILES

2005-12-17 Thread David Fang
Is this what you meant? Admittedly, I'm sure how to use a stamp-file in this case (I've only hacked my own stamp schemes for completely different situations in Makefiles). Sorry, last post should've read: I'm UNSURE how to use a stamp-file in this case... David Fang

Re: Directory recursion

2005-12-12 Thread David Fang
Hi, What if you capitalized SUBDIRS in Makefile.am? (That's how it looks in all examples I've seen. :) ) The top-level Makefile.am is a one-liner: subdirs = src and the src/Makefile.am is also a one-liner, pointing to the two subfolders: subdirs = sub1 sub2 David Fang

AC_CONFIG_HEADERS vs. AC_CONFIG_FILES

2005-12-12 Thread David Fang
have these variables isolated from config.h. Another idea could be to provide an option in AC_DEFINE to retarget to another file besides the default config.h? Any ideas? David Fang ___ Autoconf mailing list Autoconf@gnu.org http

Re: How to remove -O2 on Makefile generated by autoconf/make

2005-11-29 Thread David Fang
? Hi, I think a combination of AM_CXXFLAGS = and configure CXXFLAGS= will work. Probably just the latter is enough. I believe -g and -O2 are picked up by default by autoconf when nothing is specified. David Fang ___ Autoconf mailing

chmod-ing AC_OUTPUT files

2005-10-05 Thread David Fang
/actions to autoreconf? There's *gotta* be something simple here, but I thought I'd throw the question out before I concoct some dirty hack. Thanks in advance! David Fang ___ Autoconf mailing list Autoconf@gnu.org http://lists.gnu.org/mailman/listinfo