LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to add C-Flag to configure script (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-add-c-flag-to-configure-script-277291/)

merlin23 01-13-2005 07:47 AM

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?

[EDIT]
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++ ??)
[/EDIT]

qwijibow 01-13-2005 08:03 AM

the normal way is to...

Code:

export CFLAGS="<insert flags for C code here>"
export CXXFLAGS="<inserts flags for C++ code here>"
./configure
make
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"



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