[Gambas-devel] compiling gambas 0.82 on debian woody

Benoit Minisini gambas at ...1...
Sun Jan 25 19:06:27 CET 2004


On Sunday 25 January 2004 14:12, José L. Redrejo wrote:
> Hi, just two things.

Hi,

> I am a LinEx (www.linex.org) developer  and I have made the deb packages of
> gambas for Debian woody, the names are gambas-doc (contains examples and
> documentation) and gambas that contains anything else. Debian woody owners
> can add the line deb http://www.linex.org/sources/linex/debian/ woody linex
> to their /etc/apt/sources.list to be able to install both packages.
>
> On the other hand. I am testing the 0.82 version, and I had some problems
> to package it . The main problem is that some includes are not valid in a
> Debian System. I have had to modify the src/lib/db/postgresql/main.c
> changing these two lines:
>
> #include <server/postgres.h>
> #include <server/catalog/pg_type.h>
>
> I have had also to use the following configure line:
>  ./configure --with-postgresql-includes=/usr/include/postgresql
> --with-sdl-includes=/usr/include/SDL/ --with-sdl-libraries=/usr/lib/
>
> That configure line, or those postgresql source changes were not necessary
> with the gambas-0.8 version, so I think some changes have been done that
> are not very effective in woody.

There was actually no modification in the directory detection of the database 
components between 0.80 and 0.82.

So I think things change on your Debian system?

The automatic detection are based on a list of directories and sub-directories 
to search.

I just have to add "/usr/lib/postgresql" to the path list so that it works.
Same thing for the SDL component.

I join this mail an updated configure.in so that you can test. Tell me the 
result!

>
> Best Regards
>
>

Best regards,

-- 
Benoit Minisini
mailto:gambas at ...1...
-------------- next part --------------
dnl ---------------------------------
dnl
dnl   configure.in for Gambas
dnl   (c) Benoît Minisini 2000-2003
dnl
dnl ---------------------------------

dnl ---- Initialization

AC_INIT(src/share/gambas.h)

AM_MAINTAINER_MODE

AC_CONFIG_SUBDIRS(libltdl)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gambas, 0.82)

AC_PREFIX_DEFAULT(/opt/gambas)

AC_DISABLE_STATIC

AC_CANONICAL_HOST


dnl ---- Checks for programs

AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET


dnl ---- Checks for header files.

AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h malloc.h strings.h sys/ioctl.h sys/time.h unistd.h)


dnl ---- Checks for typedefs, structures, and compiler characteristics.

AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM

dnl ---- Checks for library functions.

AC_FUNC_ALLOCA
AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
AC_FUNC_STRCOLL
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_FUNC_WAIT3
AC_CHECK_FUNCS(getcwd gettimeofday mkdir rmdir select socket strdup strerror strtod strtol)
AC_REPLACE_FUNCS(setenv unsetenv)


dnl ---- Support for libltdl

AC_LIBTOOL_DLOPEN
AC_LIBLTDL_CONVENIENCE
AC_PROG_LIBTOOL

AC_SUBST(INCLTDL)
AC_SUBST(LIBLTDL)

LD_FLAGS=-no-undefined
AC_SUBST(LD_FLAGS)

dnl ---- Checks for libraries

AC_CHECK_LIB(m, main, echo -n)
AC_CHECK_LIB(z, main, echo -n)

C_LIB=-lc

AC_SUBST(C_LIB)

AC_CHECK_LIB(gcc_s, main, CXX_LIB="$CXX_LIB -lgcc_s")
AC_CHECK_LIB(stdc++, main, CXX_LIB="$CXX_LIB -lstdc++")

AC_SUBST(CXX_LIB)

dnl ---- Check for shared library extension

GB_SHARED_LIBRARY_EXT()


dnl ---- Check for threading

GB_THREAD()


dnl ---- Check for internationalization library

GB_COMPONENT(
  intl,
  INTL,
  [internationalization library (if not present in C library)],
  [GB_FIND(libintl.h, /usr /usr/local, include)],
  [GB_FIND(libintl.$SHLIBEXT, /usr /usr/local, lib)],
  [-lintl])

dnl ---- Check for charset conversion library

GB_COMPONENT(
  conv,
  CONV,
  [charset conversion library (if not present in C library)],
  [GB_FIND(iconv.h, /usr /usr/local, include)],
  [GB_FIND(libiconv.$SHLIBEXT, /usr /usr/local, lib)],
  [-liconv])

dnl ---- Checks for components

GB_COMPONENT(
  qt,
  QT,
  [QT component],
  [GB_FIND(qptrlist.h, /usr /usr/lib /usr/local /usr/X11 /usr/X11R6, include qt*/include qt/*/include)],
  [GB_FIND(libqt-mt.$SHLIBEXT, /usr /usr/local /usr/qt /usr/qt/* /usr/X11 /usr/X11R6, lib, libqt-mt.so.3)],
  [$CXX_LIB $THREAD_LIB $X_LIBS -lqt-mt],
  [$THREAD_INC])

if test "$have_qt"="yes"; then

  AC_PATH_X
  AC_PATH_XTRA

  AC_CHECK_LIB(X11, XOpenDisplay, echo -n,
    AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
    $X_LIBS)

  AC_CHECK_LIB(Xext, XShmAttach, echo -n,
    AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]),
    $X_LIBS)


  dnl AC_MSG_CHECKING(for QT meta-object compiler)

  AC_PATH_QT_MOC($QT_PATH)

  GB_COMPONENT(
    kde,
    KDE,
    [KDE 3.x component],
    [GB_FIND(kapplication.h, `kde-config --prefix 2> /dev/null`, include)],
    [GB_FIND(libkdecore.$SHLIBEXT, `kde-config --prefix 2> /dev/null`, lib)],
    [-lkdecore -lkdeui -lDCOP -lkio])

fi

dnl ---- Networking component

GB_COMPONENT(
  net,
  NET,
  [Networking component],
  [GB_FIND(curl.h, `curl-config --prefix 2> /dev/null`, include)],
  [GB_FIND(libcurl.$SHLIBEXT, `curl-config --prefix 2> /dev/null`, lib)],
  [$C_LIB $THREAD_LIB `curl-config --libs 2> /dev/null`],
  [$THREAD_INC])

dnl ---- Database components

GB_COMPONENT(
  postgresql,
  PGSQL,
  [PostgreSQL driver],
  [GB_FIND(libpq-fe.h postgres.h pg_type.h, /usr /usr/lib /usr/local /opt, include/pgsql* pgsql*/include include/postgresql* postgresql/include include)],
  [GB_FIND(libpq.$SHLIBEXT, /usr /usr/local /opt, lib pgsql*/lib)],
  [$C_LIB -lpq])

GB_COMPONENT(
  mysql,
  MYSQL,
  [MySQL driver],
  [GB_FIND(mysql.h my_config.h, /usr /usr/lib /usr/local /opt, include mysql*/include)],
  [GB_FIND(libmysqlclient.$SHLIBEXT, /usr /usr/local /opt, lib mysql*/lib)],
  [$C_LIB -lmysqlclient -lz])


dnl ---- SDL component needs: libvorbisfile.la libsmpeg.la libogg.la

GB_COMPONENT(
  sdl,
  SDL,
  [SDL component],
  [GB_FIND(SDL.h SDL_mixer.h, /usr, include SDL*/include include/SDL*)],
  [GB_FIND(libSDL.$SHLIBEXT libSDL_mixer.$SHLIBEXT, /usr, lib SDL*/lib lib/SDL*)],
  [$C_LIB $THREAD_LIB -lSDL -lSDL_mixer],
  [$THREAD_INC])


dnl ---- VB component

GB_COMPONENT(
  vb,
  VB,
  [Visual Basic compatibility component],
  [],
  [],
  [$C_LIB $THREAD_LIB],
  [$THREAD_INC])

dnl ---- Other options

AC_ARG_ENABLE(
  debug,
  [  --enable-debug                 compile for debugging (default: yes)],
  gambas_debug=$enableval,
  gambas_debug=yes
)

AM_CONDITIONAL(DEBUG, test "$gambas_debug" = yes)


AC_ARG_ENABLE(
  optimization,
  [  --enable-optimization          compile with optimizations (default: no)],
  gambas_optimization=$enableval,
  gambas_optimization=no
)

AM_CONDITIONAL(OPTIMIZE, test "$gambas_optimization" = yes)


AC_ARG_ENABLE(
  profiling,
  [  --enable-profiling             compile with profiling (default: no)],
  gambas_prof=$enableval,
  gambas_prof=no
)


AC_ARG_ENABLE(
  preloading,
  [  --enable-preloading            enable preloading (default: yes)],
  gambas_preloading=$enableval,
  gambas_preloading=yes
)

if test "$gambas_preloading" = "yes"; then
  AC_DEFINE(DO_PRELOADING, 1, allows shared library preloading )
fi


CFLAGS="$CFLAGS -pipe -Wall"
CXXFLAGS="$CXXFLAGS -pipe -Wall -fno-exceptions"

if test "$gambas_prof" = "yes"; then
  CFLAGS="$CFLAGS -pg"
  CXXFLAGS="$CXXFLAGS -pg"

#  if test "$gambas_optimization" = "yes"; then
#    echo -e "\n**** Warning: --enable-profiling implies --disable-optimization\n"
#    gambas_optimization="no";
#  fi

fi

if test "$gambas_debug" = "yes"; then
  CFLAGS="$CFLAGS -g"
  CXXFLAGS="$CXXFLAGS -g"
fi

# gambas_flag="-O2 -fstrength-reduce -frerun-loop-opt -fexpensive-optimizations -fschedule-insns2 -funroll-loops"
# gambas_flags="$gambas_flags -fno-strict-aliasing -falign-loops=2 -falign-jumps=2"
# gambas_flags="$gambas_flags -falign-functions=2 -ffast-math"

if test "$gambas_prof" = "no"; then
  gambas_flags="$gambas_flags -fomit-frame-pointer"
fi

if test "x$gambas_optimization" = "xyes"; then
  CFLAGS="$CFLAGS -Os"
  CXXFLAGS="$CXXFLAGS -Os"
else
  CFLAGS="$CFLAGS -O0"
  CXXFLAGS="$CXXFLAGS -O0"
fi


dnl ---- Create makefiles

AC_OUTPUT( \
Makefile \
src/Makefile \
src/share/Makefile \
src/comp/Makefile \
src/exec/Makefile \
src/lib/Makefile \
src/lib/eval/Makefile \
src/lib/example/Makefile \
src/lib/qt/Makefile \
src/lib/qt/editor/Makefile \
src/lib/qt/ext/Makefile \
src/lib/qt/kde/Makefile \
src/lib/db/Makefile \
src/lib/db/mysql/Makefile \
src/lib/db/postgresql/Makefile \
src/lib/sdl/Makefile \
src/lib/net/Makefile \
src/lib/vb/Makefile \
)


More information about the Devel mailing list