reduce fails to build on 10.6

Mark Brethen mark.brethen at gmail.com
Sat Jan 7 19:53:42 PST 2012


On Jan 6, 2012, at 8:02 PM, Ryan Schmidt wrote:

>> 
>> You say that MacPorts' configure invocation would include a bunch of environment variables, etc. but I can't see how that helps, since the configure script, and I assume the make files as well, are running "gcc" explicitly.
> 
> Correct; in that case, you would first have to patch the configure script to make use of the environment variables (like $CC) that MacPorts passes.

I looked at the top level configure and make scripts and it looks to me like they use the environment variables, with one exception noted below:

configure:

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

configure.ac:

# The following may not give the most helpful messages if there is no
# C compiler at all, so I will do a simple pre-check based on a limited
# number of plausible choices.

AC_CHECK_PROGS(CCOMPILER, [gcc cc $CC], [none])
AC_CHECK_PROGS(CXXCOMPILER, [g++ CC $CXX], [none])

*darwin*)
  AC_MSG_NOTICE([Building for Macintosh/Darwin with X11])
  darwin_build="yes"
  AC_DEFINE(MACINTOSH, [1], [True if we are running on Macintosh])
  CFLAGS="$CFLAGS -fno-common -no-cpp-precomp"
  CXXFLAGS="$CXXFLAGS -fno-common -no-cpp-precomp"
  CPPFLAGS="$CPPFLAGS -fno-common -no-cpp-precomp -flat_namespace -I/usr/X11R6/include"
  AC_DEFINE(UNIX,[1],[True if we are running on Unix, Linux, BSD etc])
  LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -flat_namespace"
  XLIBS="-lXext -lX11"
  macintosh_build="yes"
  darwin_build="yes"
  LDFLAGS="$LDFLAGS -framework Carbon -framework CoreServices -framework ApplicationServices"
  AC_LANG_CONFTEST(
    [AC_LANG_PROGRAM([], [])])
  if gcc -isysroot /Developer/SDKs/MacOSX10.7.sdk -arch ix86_64 conftest.c -o conftest > /dev/null 2>&1
  then
    AC_MSG_NOTICE([x96_64 binary creation will probably be possible using 10.7])
#   enable_dependency_tracking="no"
  else
    if gcc -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch ix86_64 conftest.c -o conftest > /dev/null 2>&1
    then
      AC_MSG_NOTICE([x86_64 binary creation will probably be possible using 10.6])

if test "x$macintosh_build" = "xyes"
then
  ENVP=MACOSX_DEPLOYMENT_TARGET=10.6
  CC="$ENVP $CC"
  CXX="$ENVP $CXX"
fi


Makefile.in:

COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)


If I'm not mistaken everything looks correct, except for the 2 if-statements. What do they need to be changed to? Do I make a bunch of diff files, or use reinplace?

There are also config/make files in /csl, /csl/fox, and /psl, which I need to check.

Mark






More information about the macports-dev mailing list