LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-21-2005, 01:26 PM   #1
Nicholas Bishop
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Rep: Reputation: 0
Autoconf's default CXXFLAGS


I've been learning about Autoconf, attempting to make "./configure && make" work correctly in some graphics software I'm writing. I'm confused about the effects of AC_PROG_CXX. It seems its primary purpose is to detect which C++ compiler to use, which makes sense. But then, according to the info page, it does this:
Quote:
If output variable `CXXFLAGS' was not already set, set it to `-g
-O2' for the GNU C++ compiler (`-O2' on systems where G++ does not
accept `-g'), or `-g' for other compilers.
This is a reasonable default, but what if I don't want either O2 optimization or -g? Of course the user of the configure script can export CXXFLAGS=-Ofoo and then AC_PROG_CXX leaves CXXFLAGS alone, but I would like to be able to provide my own reasonable default that would override AC_PROG_CXX, yet that could still be overridden by the user. Is there a good way to do this?
 
  


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
Details about default web Browser & default Email client sudhasmyle Linux - Software 4 06-15-2006 11:45 AM
DMA works but not by default (despite "use DMA by default" kernel) mehlkelm Linux - Hardware 7 04-11-2005 03:29 PM
Default Drowser & Default E-mail Cli sudhasmyle Linux - Networking 1 11-20-2004 10:42 AM
setting default page size and default tray lived4eva Linux - General 1 11-04-2003 02:39 PM
New Virtual Servers Default to Default Server Page? DigiDave Linux - Software 4 10-18-2003 03:23 AM

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

All times are GMT -5. The time now is 10:43 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