Quote:
Originally posted by TieN
Hi all i hope this is the correct place to post this question!
I am trying to put the following optimisations into a script that i can call if i want to compile apache (or anything) for a web server. I can do an "export" on the command line and see these variables using env but if i put them in an (chmod 755) file then run it they seem not to be set. I am running slackware 10.1 and manually created /etc/bashrc with these entrys but with no joy. I also tried to add them to the /etc/profile.
export CFLAGS="-O2 -march=pentium4"
export MAKEOPTS="-j5"
export CXXFLAGS=$CFLAGS
my eventual goal is to be able to build any software without specifically typing these 3 lines.
Thanks in advance.
|
In 99% of the cases you do this when you compile program:
Code:
CFLAGS="-O2 -march=pentium4" ./configure
I would stay with this. Making those changes global can only cause trouble
You could also put them in a script in /usr/local/bin and call the script every time you run configure,
something like my_flags:
Code:
#!/bin/bash
CFLAGS="-O2 -march=pentium4" MAKEOPTS="-j5" CXXFLAGS=$CFLAGS "$1"
then try :
Code:
my_flags ./configure