Date: Fri, 5 Nov 2004 00:04:17 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 438 ************************************************** Thursday 04 November 2004 Number 438 ************************************************** Subjects for today 1 Re: Warpzilla Build Instructions : Knut St. Osmundsen" 2 Re: AM_WITH_REGEX macro : Andreas Buening **= Email 1 ==========================** Date: Wed, 03 Nov 2004 18:38:30 +0100 From: "Knut St. Osmundsen" Subject: Re: Warpzilla Build Instructions Andreas Buening wrote: > Knut St. Osmundsen wrote: > >>Stefan.Neis at t-online.de wrote: > > >>>AFAIK, Innotek uses "optlink" by default (probably following what >>>VAC++ did...), while EMX used standard convention. But I just might >>>be confused ... >> >>No, we don't. BUT we use the same namemangling for a.out and OMF, and we >>don't have any underscore prefix hacks for importlibraries and stuff >>like EMX had. > > > Thanks for the clarification. > > Just for curiosity: is this now the same name mangling scheme > as used by other gcc implementations on other systems? Yes, and no. GCC for OS/2 have (like mingw/cyginw have too IIRC) an underscore prefix on all symbols. Linux (i386 at least) doesn't. GCC for OS/2 also decorate stdcall (win32 api and OS/2 kernel calling convention) with the at n suffix like VAC, VC++ and Watcom does - GCC normally doesn't. Kind Regards, knut **= Email 2 ==========================** Date: Wed, 03 Nov 2004 22:43:25 +0100 From: Andreas Buening Subject: Re: AM_WITH_REGEX macro John Poltorak wrote: > regex.m4 exists under \usr\local\share\aclocal and it's my understanding > that this macro gets run by including AM_WITH_REGEX in configure.in but > maybe some additional entry is also required... There is no Makefile.am > in the release of DIFF I'm looking at. Does this pose a problem? That regex.m4 file comes with automake and is something completely different (and obsolete). What you want is the regex.m4 file from the grep 2.5.1 source which contains the jm_INCLUDED_REGEX macro. And that is a very non-standard macro. Provided that your DIFF is rather old, you have only one source file regex.c which resides e.g. in "./lib". The following is IIRC: 1) Copy regex.m4 into the m4 subdirectory of your source package (may have another name instead of "m4", e.g. "config" or just "."). If there is no *.m4 file except aclocal.m4 or acinclude.m4, then just copy&paste the macro into acinclude.m4. 2) Run "aclocal -I m4" (or whatever is your m4 subdirectory). This command will put the whole macro into the aclocal.m4 file. You can check this. 3) Put the macro name jm_INCLUDED_REGEX using the correct syntax into your configure.in or configure.ac) file whatever exists: jm_INCLUDED_REGEX([lib/regex.c]) Put it neither at the beginning nor at the end of configure.in. 4) Remove all references to "regex.*", e.g. regex.c, regex.o, regex.$OBJEXT or whatever exist from Makefile.am (or from lib/Makefile.am if there is any). This can be the most difficult part. Only the final linker call when you run "make" will show you whether you've removed regex.* correctly. Try & error. 5) Run autoconf. This will create "configure" which will run the macro code. You can check this if you search for some string from regex.m4 which should have made its way into configure. 6) It's possible that you need a Makefile.am file (and automake) for this macro to work. I never checked this. In that case you'd better use another package for your experiments. (Manipulating e.g. $(LIBOBJ) by hand in Makefile.in can be difficult). You may have to rerun aclocal, autoconf & friends until it works (provided I haven't forgotten any important step ;-) ). Bye, Andreas