You are not logged in.
Pages: 1
Desmume's current configure.ac kinda sucks, it's doing some stuff wrong, and some other things that are just not a good thing to do.
First it's using AC_CANONICAL_TARGET, this is wrong, it should use AC_CANONICAL_HOST, I've posted a patch to fix this on the sourceforge tracker.
EDIT: patch
EDIT2: more info on AC_CANONICAL_*
The second thing is more about what it doesn't do, all optional features should have a --disable option source based Linux distro's need this because without it stuff breaks (see here for why it's bad, and here for the right thing to do)
I have some questions about some of the other bits, in particular:
dnl - Check for pkg-config macros
m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG])
dnl - Check for intltool/gettext macros
m4_ifdef([IT_PROG_INTLTOOL],[IT_PROG_INTLTOOL])Why do this? You only need to have intltool or pkg-config on the system when running autogen.sh/aclocal to get the macros, so it wouldn't affect people building released versions, only subversion builds... and if you have mingw and the GTK development stuff you get pkg-config with that... I don't know about OSX however.
The other minor issue is, I've noticed that the script has a tendency to make new variables when one autoconf provides automatically would due (ie the osmesa one, autoconf already gives enable_osmesa with almost the same values, and to make the script work with that it could just look like:
AC_ARG_ENABLE([osmesa],
[AC_HELP_STRING([--enable-osmesa], [use off-screen mesa])])
if test "x$enable_osmesa" = "xyes" ; thenand it would get exactly the same results... I could do up some patches if that'd be good.
Last edited by Spudd86 (2011-01-04 04:33:13)
Offline
Here's the patch since sourceforges patch tracker seems to be confusing...:
From a481bbf847993268e1d4a822594a44e6d4d16452 Mon Sep 17 00:00:00 2001
From: Thomas Jones
Date: Tue, 30 Nov 2010 16:10:09 -0500
Subject: [PATCH] autoconf: use AC_CANONICAL_HOST not AC_CANONICAL_TARGET
AC_CANONICAL_TARGET is for compilers, desmume is not a compiler. It
figures out what platform the compiler should generate binaries for.
AC_CANONICAL_HOST is for figuring out what platform you will run on.
---
desmume/configure.ac | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/desmume/configure.ac b/desmume/configure.ac
index cd1711f..f344b88 100644
--- a/desmume/configure.ac
+++ b/desmume/configure.ac
@@ -4,8 +4,8 @@ dnl --- Release version is second argument to AC_INIT
AC_INIT(desmume, [svn])
dnl -- find target architecture for some os specific libraries
-AC_CANONICAL_TARGET
-case $target in
+AC_CANONICAL_HOST
+case $host in
*linux*) desmume_arch=linux;;
*mingw*) desmume_arch=windows;;
*darwin*) desmume_arch=linux;;
@@ -270,7 +270,7 @@ AC_ARG_ENABLE(wifi,
])
dnl Set compiler library flags per target.
-case $target in
+case $host in
*linux* | *bsd*)
LIBS="$LIBS -lGLU"
;;
--
1.7.2.2Last edited by Spudd86 (2010-12-01 21:41:01)
Offline
Pages: 1