Bug 4744 - autogen exist with make: Fatal error: Unknown option `-C'
Summary: autogen exist with make: Fatal error: Unknown option `-C'
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Sparc Solaris
: P3 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Andrew Bartlett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-26 10:52 UTC by David S. Collier-Brown
Modified: 2007-07-16 22:50 UTC (History)
1 user (show)

See Also:


Attachments
A trivial patch to fix a non-portable autogen.sh (394 bytes, patch)
2007-07-14 16:18 UTC, David S. Collier-Brown
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David S. Collier-Brown 2007-06-26 10:52:30 UTC
Running on Solaris 10 SPARC and compiling Samba with gcc 3.4.5,
Solaris make and the autoconf 2.59 from blastwave (aka http://ibiblio.org/pub/packages/solaris/csw/stable) I get
the following on an initial configure and compile:
---
/opt/csw/bin/autoconf
./autogen.sh
./autogen.sh: running script/mkversion.sh
./script/mkversion.sh: 'version.h' created for Samba("4.0.0tp6-SVN-build-23605")
./autogen.sh: running autoheader -I. -Ilib/replace
./autogen.sh: running autoconf -I. -Ilib/replace
./autogen.sh: building Web Application Framework (SWAT)
Usage : make [ -f makefile ][ -K statefile ]... [ -d ][ -dd ][ -D ][ -DD ]
             [ -e ][ -i ][ -k ][ -n ][ -p ][ -P ][ -q ][ -r ][ -s ][ -S ][ -t ]
             [ -u ][ -w ][ -V ][ target... ][ macro=value... ][ "macro +=value"... ]
make: Fatal error: Unknown option `-C'
*** Error code 1
Comment 1 Andrew Bartlett 2007-07-08 23:30:52 UTC
It's looking for a gnu make.  

I agree, it's not the right spot, but for the moment the easy option for you is to download this from the unpacked rsync area, which has the ./autogen.sh already run.

Comment 2 David S. Collier-Brown 2007-07-09 08:28:41 UTC
OK, I'll look for the appropriate place to test for
gnu make and propose a fix...
Comment 3 David S. Collier-Brown 2007-07-14 16:18:47 UTC
Created attachment 2820 [details]
A trivial patch to fix a non-portable autogen.sh
Comment 4 David S. Collier-Brown 2007-07-14 16:23:00 UTC
A trivial bug: The script contained the idiom
   make -C <dir> <targets> || exit 1
which is non-portable to standard makes,
and turns out to be not how the Gnu
make folks say to do subdirectories anyway.

I've attached an equally trivial patch to
change it to 
    (cd <dir>; make <targets> || exit 1)

I'll CC the list, too.

--dave
Comment 5 Andrew Bartlett 2007-07-16 22:50:28 UTC
Fixed in SVN.

Thanks