Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Configure Quirks ===== Zero exit status doesn't guarantee you that configure script did not stumble upon any problems. When making a port, you should carefully examine its output, looking for any problems and trying to understand every "... no" the script encounters. ==== ac_compile vs ac_cpp ==== === Synopsis === <code> checking vorbis/codec.h usability... yes checking vorbis/codec.h presence... no configure: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: vorbis/codec.h: proceeding with the compiler's result </code> === Under the hood === <code> ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' </code> === Workaround === <code> CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ENV+= CPPFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" </code> Notice CPPFLAGS instead of CFLAGS in CONFIGURE_ENV ==== Comparisons ==== === Synopsis === <code> checking for netcdf library... test: x/usr/local/lib: unexpected operator test: x/usr/local/lib: unexpected operator test: x-L/usr/local/lib -lnetcdf: unexpected operator -L/usr/local/lib -lnetcdf </code> === Under the hood === <code> if test x"${netcdf_lib_dir}" == x ; </code> === Workaround === Here are some hardcore substitutions: <code> @${REINPLACE_CMD} -E \ -e 's/test x(\".*\") ==? x([^:_."[:alnum:]-]|$$)/[ -z \1 ]\2/' \ -e 's/test x(\".*\") != x([^:_."[:alnum:]-]|$$)/[ -n \1 ]\2/' \ -e 's/test \"x(.*\") ==? x([^:_."[:alnum:]-]|$$)/[ -z \"\1 ]\2/' \ -e 's/test \"x(.*\") != x([^:_."[:alnum:]-]|$$)/[ -n \"\1 ]\2/' \ -e 's/test (\".*)\+set(.*)\" ==? set([^:_."[:alnum:]-]|$$)/[ -n \1\2\" ]\3/' \ -e 's/test (\".*)\+set(.*)\" != set([^:_."[:alnum:]-]|$$)/[ -z \1\2\" ]\3/' \ -e 's/test (.*) ==/test \1 =/' ${WRKSRC}/configure </code> In fact a simple '/test/s|==|=|g' is sufficient in many cases. Other ones are beautifiers. ports/configure.txt Last modified: 2017/07/10 08:55by MarkLinimon