[GM-help] Weird configure quirk on FreeBSD
Swiss army knife of image processing
Brought to you by:
bfriesen
From: <no...@no...> - 2005-05-23 20:59:07
|
Can anyone explain this? It took me forever to figure out that to successfully configure GraphicsMagick on FreeBSD 5.3 I need the following configure command: ./configure --with-x=no CPPFLAGS=-I/usr/local/include LDFLAGS='-L/usr/local/lib' The reason this took me so long to figure out is that the configure output reports that it appends "-L/usr/local/lib" to LDFLAG by default. I tried every LDFLAGS setting that I could think of. For example: LDFLAGS='-rpath /usr/local/lib' LDFLAGS='-R/usr/local/lib' LDFLAGS='-Wl,-rpath,/usr/local/lib' It each case configure would append '-L/usr/local/lib', so I assumed that I didn't need to specify this. At any rate, I finally added '-L/usr/local/lib' manually and it worked. The configure output shows the "-L" option twice. Options used to compile and link: CC = gcc CFLAGS = -g -O2 -Wall -D_THREAD_SAFE -pthread CPPFLAGS = -I/usr/local/include/freetype2 -I/usr/local/include CXX = g++ CXXFLAGS = -D_THREAD_SAFE -pthread DEFS = -DHAVE_CONFIG_H LDFLAGS = -L/usr/local/lib -L/usr/local/lib LIBS = -ltiff -lfreetype -ljpeg -lpng -lbz2 -lz -lm -lc_r Notice that LDFLAGS shows "-L/usr/local/lib" twice. This seems to be the only configuration that works for me. If I leave off the LDFLAGS then configure still reports that it is using LDFLAGS with "-L/usr/local/lib": Options used to compile and link: CC = gcc CFLAGS = -g -O2 -Wall -D_THREAD_SAFE -pthread CPPFLAGS = -I/usr/local/include/freetype2 -I/usr/local/include CXX = g++ CXXFLAGS = -D_THREAD_SAFE -pthread DEFS = -DHAVE_CONFIG_H LDFLAGS = -L/usr/local/lib LIBS = -ltiff -lfreetype -lbz2 -lz -lm -lc_r But now it won't use libjpeg or libpng. I get these errors: JPEG v1 --with-jpeg=yes no (failed tests) PNG --with-png=yes no (failed tests) At any rate, I got it to work, but this seems funny. Why does it need "-L/usr/local/lib" twice? Yours, Noah Spurrier |