Hi, I've got three problems, which may or may not be related. I'm not sure if it's an automake, autoconf or gtk problem. I've just downloaded and installed the latest automake (1.6.1) and autoconf (2.53) which has not made any improvement (if fact I got a bit further slightly older releases).
I've a farily simple program that needs the gtk library. I've copied a bit of code from the configure.in of another package and are trying to use that. I believe this defines a macro AM_PATH_GTK that searches for the library. I have 3 problems. 1) autoconf gives an error: wren /export/home/davek/atlc % autoconf configure.in:91: error: possibly undefined macro: AM_INIT_AUTOMAKE 2) automake gives an error wren /export/home/davek/atlc % automake configure.in:91: no proper implementation of AM_INIT_AUTOMAKE was found, configure.in:91: probably because aclocal.m4 is missing... configure.in:91: You should run aclocal to create this file, then configure.in:91: run automake again. src/gui/Makefile.am: required file `./depcomp' not found /usr/local/stow/automake-1.6.1/share/automake-1.6/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL 3) Running aclocal gives an error about a missing library wren /export/home/davek/atlc % aclocal aclocal: configure.in: 126: macro `AM_PATH_GTK' not found in library This last erorr is the one really bothering me. As far as I can tell, it is defined in configure.in. Prior to updating automake and autoconf (originally 1.4 and 2.52), a configure script was generated that run okay. Even the macro that is apparently undefined ran okay, and worked as expected. However, the generated Makefile would always fail to run with the "macro `AM_PATH_GTK' not found in library" message. Can anyone see what I'm doing wrong. I've attached the configure.in. -- Dr. David Kirkby PhD, email: [EMAIL PROTECTED] web page: http://www.david-kirkby.co.uk Amateur radio callsign: G8WRB
dnl Process this file with autoconf to produce a configure script. dns This macro is copied from the wxWindows distribution. dnl --------------------------------------------------------------------------- dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS. Uses variables dnl gtk_config_prefix and/or gtk_config_exec_prefix if defined. dnl --------------------------------------------------------------------------- dnl AC_DEFUN(AM_PATH_GTK, [ if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi AC_PATH_PROG(GTK_CONFIG, gtk-config, no) min_gtk_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if test "$GTK_CONFIG" != "no" ; then GTK_CFLAGS=`$GTK_CONFIG --cflags` GTK_LIBS=`$GTK_CONFIG --libs gthread` ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" dnl dnl Now check if the installed GTK is sufficiently new. (Also sanity dnl checks the results of gtk-config to some extent) dnl AC_TRY_RUN([ #include <gtk/gtk.h> #include <gtk/gtkfeatures.h> #include <stdio.h> #include <stdlib.h> int main () { int major, minor, micro; if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((GTK_MAJOR_VERSION != gtk_major_version) || (GTK_MINOR_VERSION != gtk_minor_version) || (GTK_MICRO_VERSION != gtk_micro_version)) { printf("Headers vs. library version mismatch!\n"); exit(1); } if (gtk_minor_version == 1) return FALSE; return !((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))); } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" else no_gtk=yes fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) ]) AC_INIT(src/non_gui/atlc.c) AM_INIT_AUTOMAKE(atlc, 5.0.0) dnl Checks for programs. AC_PROG_CC AC_PROG_CXX AC_ISC_POSIX AC_OUTPUT_COMMANDS([exit]) dnl Checks for libraries. AC_CHECK_LIB(m,main) AC_CHECK_LIB(gslcblas,main) AC_CHECK_LIB(gsl,main) dnl Checks for header files. AC_STDC_HEADERS AC_HAVE_HEADERS(stdio.h math.h errno.h stdlib.h string.h thread.h pthread.h pthreads.h) dnl check to see if the machine is big endian AC_C_BIGENDIAN dnl check size of short. int and long AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(size_t) dnl Check for st_blksize in struct stat AC_ST_BLKSIZE dnl Check if the user wants a GUI. If so makes sure GTK is around. AC_ARG_WITH(gui, [ --with-gui=[no] Add a GUI (needs GTK >= 1.2.7 installed) ]) if test "x$with_gui" = "xyes"; then USE_GUI=1 AM_PATH_GTK(1.2.7, GTK127=1) if test "$GTK127" != 1; then AC_MSG_ERROR([ Please check that gtk-config is in path, the directory where GTK+ libraries are installed (returned by 'gtk-config --libs' command) is in LD_LIBRARY_PATH or equivalent variable and GTK+ is version 1.2.7 or above. ]) fi fi dnl Multi-Processor Support AC_ARG_WITH(mp, [ --with-mp=[no] support multiple processors (needs pthreads installed) ]) if test "x$with_mp" = "xyes"; then AC_DEFINE(ENABLE_MP) AC_DEFINE(_REENTRANT) AC_DEFINE(_THREAD_SAFE) AC_CHECK_LIB(thread, pthread_create) AC_CHECK_LIB(pthread, pthread_create) AC_CHECK_LIB(thread, thr_setconcurrency, [AC_DEFINE(HAVE_THR_SETCONCURRENCY)]) fi dnl Only use -Wall if we have gcc if test "x$GCC" = "xyes"; then if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then CFLAGS="$CFLAGS -Wall" fi fi dnl Only use -O3 if we have gcc if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -O3" fi dnl Check for the GNU scientific library header files. AC_HAVE_HEADERS(gsl/gsl_sf_ellint.h,,AC_MSG_WARN([ To get full functionality you should install the GNU scientific library (gsl) available at http://sources.redhat.com/gsl. Without gsl it will be impossible to evalute the theoretical impedance of a coupler using \"make_coupler\"])) AC_OUTPUT([\ Makefile \ src/Makefile \ src/non_gui/Makefile \ man/Makefile \ examples/Makefile \ docs/Makefile \ docs/html-docs/Makefile \ docs/html-docs/jpgs/Makefile \ docs/qex-december-1996/Makefile \ docs/theory/Makefile \ docs/Makefile ]) if test "x$with_gui" = "xyes"; then AC_OUTPUT([src/gui/Makefile]) fi