Page 1 of 1

Possible bug in the configure script?

Posted: 19 Apr 2005, 17:39
by Pajarico
Hi all,
Im' running amd64 + gentoo, and the configure script only detects guichan if I compile it from source manually.
When i do that the libs are installed under /usr/local/lib

If use the ebuild the libs seems to compile just fine and are installed under /usr/lib64, but they aren't detected.

/usr/lib64 is a symlink to /usr/lib.

:wink:

Posted: 19 Apr 2005, 18:01
by Bjørn
I think you just need to check closer your system setup and environment. There should be anything in the generated configure script related to those locations.

Posted: 19 Apr 2005, 18:20
by Pajarico
This the part with references to guichan:

Code: Select all

# Checks for libraries
# (someone may want to exchange these symbols with
#  something more meaningful in the future /- kth5)


echo "$as_me:$LINENO: checking for gcnGuichanVersion in -lguichan" >&5
echo $ECHO_N "checking for gcnGuichanVersion in -lguichan... $ECHO_C" >&6
if test "${ac_cv_lib_guichan_gcnGuichanVersion+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lguichan  $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char gcnGuichanVersion ();
int
main ()
{
gcnGuichanVersion ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  (eval $ac_link) 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } &&
	 { ac_try='test -z "$ac_cxx_werror_flag"
			 || test ! -s conftest.err'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; } &&
	 { ac_try='test -s conftest$ac_exeext'
  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  (eval $ac_try) 2>&5
  ac_status=$?
  echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); }; }; then
  ac_cv_lib_guichan_gcnGuichanVersion=yes
else
  echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

ac_cv_lib_guichan_gcnGuichanVersion=no
fi
rm -f conftest.err conftest.$ac_objext \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_guichan_gcnGuichanVersion" >&5
echo "${ECHO_T}$ac_cv_lib_guichan_gcnGuichanVersion" >&6
if test $ac_cv_lib_guichan_gcnGuichanVersion = yes; then
  cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGUICHAN 1
_ACEOF

  LIBS="-lguichan $LIBS"

else
  { { echo "$as_me:$LINENO: error:  *** Unable to find Guichan library (guichan.sf.net)" >&5
echo "$as_me: error:  *** Unable to find Guichan library (guichan.sf.net)" >&2;}
   { (exit 1); exit 1; }; }
fi


#AC_CHECK_LIB([guichan_sdl], [gcnSDL], ,
#AC_MSG_ERROR([ *** Unable to find Guichan SDL library (guichan.sf.net)]))

#AC_CHECK_LIB([guichan_opengl], [gcnOpenGL], ,
#AC_MSG_ERROR([ *** Unable to find Guichan OpenGL library (guichan.sf.net)]))
I could look into it but I just don't understand it.

:wink:

Posted: 21 Apr 2005, 12:25
by Bjørn
Well that's generated code which anybody would have a hard time understanding. :-) The idea is that it uses a minimal source file containing a certain function from Guichan and then tries to compile and link it, checking if any error occurs. It should work for Guichan 0.3.0, it won't for any older version.

There's not much we can do about it because all we did was specify the following check in configure.ac:

AC_CHECK_LIB([guichan], [gcnGuichanVersion], ,
AC_MSG_ERROR([ *** Unable to find Guichan library (guichan.sf.net)]))

If you think nothing is wrong with your environment, you can try taking out the check completely and cross your fingers while you run make. Probably better is to check config.log to find out why ./configure fails on this test.