#13 gens-rc2.tar.gz configure patch

closed-wont-fix
nobody
None
5
2004-01-03
2003-08-07
Anonymous
No

Seems there is a bug in the configure script for
gens-rc2.tar.gz

Problem:
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\"
-DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"gens\"
-DVERSION=\"2.12a\" -DSTDC_HEADERS=1 -I. -I. -I./linux
-DLINUX -D__PORT__ -I/usr/include/SDL -D_REENTRANT
-DWITH_GTK -DGTK_DISABLE_DEPRECATED
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/X11R6/include -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-DDATADIR=\"/usr/local/share/gens\" -g -O2 -I -c -o
linux/gens-g_ddraw.o `test -f linux/g_ddraw.cpp || echo
'./'`linux/g_ddraw.cpp
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/../../../crt1.o(.text+0x18):
In function `_start':
: undefined reference to `main'

Solution:
The bug lies in trying to pass '-I' with no pathname:
"-g -O2 -I -c -o"
This results if no X headers are found but X libs are.
In the configure script, the '$ac_x_includes' variable should
include '-I' & be removed from 'CXXFLAGS="$CXXFLAGS
-I $ac_x_includes"'
So should read:
CXXFLAGS="$CXXFLAGS $ac_x_includes"
This way if the variable isn't filled, the generated
gens/Makefile still passes sane CFLAGS to g++ instead of:
CXXFLAGS="$CXXFLAGS -I"

Have attached a quick patch for configure script.
Note that this also includes the patch necessary for
correctly finding X includes (on my system anyway).

Of course, the ultimate reward for getting this to Make
correctly was being able to play Sonic3 with my PSX pad
via the fantastic joystick support this version brings.
Nice work :)

Regards,
Rick

Discussion

  • gens-rc2-configure.patch

     
    Attachments
    • status: open --> closed-wont-fix
     
  • Logged In: YES
    user_id=315186

    gens-rc3 won't use c++
    Anyway, thanks for your remarks !