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>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
위에 나열된 환경 변수를 사용하면 configure script에서 지정된 컴파일 관련 옵션을 overriding 할 수 있다. 여기서 중요한 점을 요약하자면,
1. -g나 -Wall 같은 컴파일러 옵션은 CFLAGS
2. -I/usr/local/mysql/include 같은 전처리기 옵션은 CPPFLAGS
3. -L/usr/local/mysql/lib 같은 링커 옵션은 LDFLAGS
4. -lmysqlclient 같은 라이브러리 지정은 LIBS
<사용 예>
# ./configure CFLAGS="-g -Wall" CPPFLAGS="-I/usr/local/mysql/include" LDFLAGS="-L/usr/local/mysql/lib" LIBS="-lmysqlclient"

comments
comments rss (+댓글 쓰러가기)