Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-13-2005, 08:47 AM   #1
Registered: Dec 2004
Location: Vienna
Posts: 46

Rep: Reputation: 15
How to add C-Flag to configure script

I want to recompile a program with the D_FILE_OFFSET_BITS=64 C-Flag to get my program working with large files (>2GB)

I tried a "./configure D_FILE_OFFSET_BITS=64", but when I run make, I see all kinds of different flags (z.B D_REENTRANT ...) appended to the gcc commands that are called, but that one I have specified before when I called ./configure isn't anywhere...

Does somebody know how this will work?

P.S: As a looked now in the generated Makefile, there are also a call to g++ and not only gcc...
is it dangerous to add some C-Flags by hand into the Makefile ?
Do I also have to append my flag to the CXXFLAGS variable ? (I think this is used by g++ ??)

Last edited by merlin23; 01-13-2005 at 08:59 AM.
Old 01-13-2005, 09:03 AM   #2
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
the normal way is to...

export CFLAGS="<insert flags for C code here>"
export CXXFLAGS="<inserts flags for C++ code here>"
make install
edit... make sure you enter, all the falgs you want to use, i think this will override the makefiles flags...

a common set of flags for both C and C++ is like so...
"-fomit-frame-pointer -pipe -O2 -mtune=i686"

Last edited by qwijibow; 01-13-2005 at 09:05 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 do I add a device/configure drivers? cmw000 Linux - Wireless Networking 1 10-03-2005 04:38 AM
configure: error: Can't find X includes. Please check your installation and add the c bme guy Linux - Newbie 11 04-10-2005 10:40 PM
Configure/Add a Scanner AMD64 Fedora 2 05-15-2004 07:28 PM
Script to add users ssudhi Linux - Newbie 3 05-01-2004 05:33 AM
How to add something in init script Ypkis Linux - Newbie 5 10-12-2003 07:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:45 AM.

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