LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-06-2010, 09:29 AM   #1
grob115
Member
 
Registered: Oct 2005
Posts: 542

Rep: Reputation: 32
How to use "autoconf"


Hello,

Am trying to install PHP by running the "configure" command but saw 2 WARNINGS about not having defined "datarootdir".

Executed this.....
Code:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/src --with-libdir=lib64 > configure.log 2>&1
Got these 2 warnings in configure.log.....
Code:
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir setting
config.status: WARNING:  'lib/Makefile.in' seems to ignore the --datarootdir setting
Looking into this further here I found that there is a change since Autoconf 2.60, the datarootdir variable is introduced and it should have been defined in the "Makefile.in" file. Guess PHP.net didn't do this properly?

So I added the line "datarootdir = @datarootdir@" in "Makefile.in". Now I need to run "autoconf" but it failed to generate the "configure" script. This is what I executed.....
Code:
/usr/bin/autoconf ./Makefile.in
But the "configure" file hasn't been changed.

Am I heading into a wrong direction to solve this problem?
 
Old 07-06-2010, 09:34 AM   #2
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
Well that's the wrong way, you probably need to start with aclocal ... etc ... I always need to look it up myself because you rarely start a new project

So, either look here for great overall information on GNU autotools:
http://sourceware.org/autobook/autob...obook_toc.html
(including the correct command sequence to create the various files)

Or just use a catch-it-all "magic" script like http://freshmeat.net/projects/buildconf/

Oh, btw, if you don't have the configure.ac (or configure.in) file, you're out of luck. Quite often, maintainers do not distribute it in the tarballs...

Last edited by zirias; 07-06-2010 at 09:36 AM.
 
Old 07-06-2010, 09:44 AM   #3
grob115
Member
 
Registered: Oct 2005
Posts: 542

Original Poster
Rep: Reputation: 32
Hello,

Actually I added the path where "autoconf" is in to my PATH variable and calls it directly from where my Makefile.in is. It now generated a new "configure" file. However, same results unfortunately. Perhaps it's like what you said, I don't have a "configure.in" file so it didn't generate the proper "configure" file.

BTW, I found a lot of Makefile.in. Check this out. Does that mean all of them needs to be changed? Would there be any harm with those warning messages?

[root@test httpd-2.2.15]# find . | grep Makefile.in
./support/Makefile.in
./server/mpm/prefork/Makefile.in
./server/mpm/experimental/event/Makefile.in
./server/mpm/mpmt_os2/Makefile.in
./server/mpm/worker/Makefile.in
./server/mpm/beos/Makefile.in
./server/mpm/Makefile.in
./server/Makefile.in
./test/Makefile.in
./os/unix/Makefile.in
./os/os2/Makefile.in
./os/beos/Makefile.in
./os/Makefile.in
./Makefile.in
./modules/proxy/Makefile.in
./modules/debug/Makefile.in
./modules/filters/Makefile.in
./modules/aaa/Makefile.in
./modules/echo/Makefile.in
./modules/arch/win32/Makefile.in
./modules/ssl/Makefile.in
./modules/experimental/Makefile.in
./modules/database/Makefile.in
./modules/http/Makefile.in
./modules/test/Makefile.in
./modules/cache/Makefile.in
./modules/generators/Makefile.in
./modules/metadata/Makefile.in
./modules/dav/main/Makefile.in
./modules/dav/fs/Makefile.in
./modules/dav/lock/Makefile.in
./modules/Makefile.in
./modules/loggers/Makefile.in
./modules/mappers/Makefile.in
./modules/ldap/Makefile.in
./srclib/pcre/Makefile.in
./srclib/apr-util/xml/expat/Makefile.in
./srclib/apr-util/xml/expat/lib/Makefile.in
./srclib/apr-util/test/Makefile.in
./srclib/apr-util/Makefile.in
./srclib/apr/test/internal/Makefile.in
./srclib/apr/test/Makefile.in
./srclib/apr/Makefile.in
./srclib/Makefile.in
 
Old 07-06-2010, 10:23 AM   #4
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
I think $datarootdir is typically ${prefix}/share, so if all the Makefiles assume exactly that and ./configure doesn't change it, I don't think the warning messages are really harmful. IIRC, with the introduction of $datarootdir, some more specific variables like docdir or datadir coult now be set relative to datarootdir, but when you use an old ./configure script, they are set relative to $prefix and it's all well, too.

If you don't have either configure.in or configure.ac (they are the same, configure.ac is just the newer name), you cannot generate a meaningful configure-script using autoconf.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I "cat" or "grep" a file to ignore lines starting with "#" ??? callagga Linux - Newbie 7 08-16-2013 06:58 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 07:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM
Any way to get "Alice"; "Call of Duty" series and "Descent 3" to work? JBailey742 Linux - Games 13 06-23-2006 01:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration