2010-04-26 5 views
4

, 마지막에 ./configure --help가 출력 실행 :configure를 실행할 때 환경 변수를 덮어 쓰는 방법은 무엇입니까? 리눅스에 대한 주요 패키지에서

Some influential environment variables: 
     CC   C compiler command 
     CFLAGS  C compiler flags 
     LDFLAGS  linker flags, e.g. -L<lib dir> if you have libraries in a 
        nonstandard directory <lib dir> 
     CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have 
        headers in a nonstandard directory <include dir> 
     CPP   C preprocessor 

Use these variables to override the choices made by `configure' or to help 
it to find libraries and programs with nonstandard names/locations. 

어떻게 디렉토리를 포함하도록 이러한 변수를 사용합니까? ./configure --CFLAGS="-I/home/package/custom/"./configure CFLAGS="-I/home/package/custom/"을 실행하려고 시도했지만 작동하지 않습니다. 어떤 제안?

답변

1

이 플래그는 configure에 전달 된 플래그가 아닙니다. 이것들은 설정해야 할 환경 변수입니다. 예 : export CFLAGS="-I foo".

+2

그러나 구성 할 수있는 플래그로 전달할 수도 있습니다. – ptomato

5

-I에 사용해야하는 변수는 CFLAGS이 아니라 CPPFLAGS입니다. CPP는 C++가 아닌 "C 전처리 기"를 의미합니다. 따라서 :

./configure CPPFLAGS='-I/home/package/custom'