autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_DEFINE problem


From: ericdan
Subject: Re: AC_DEFINE problem
Date: Fri, 28 Apr 2006 01:40:34 -0700
User-agent: Internet Messaging Program (IMP) H3 (4.0.4)

hi,
i am not on my computer at home right now and don't have cvs on this to download it, but i got this from sourceforge
it's package "epsilon" in enlightenment 17 cvs

dnl Process this file with autoconf to produce a configure script.

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(epsilon, 0.3.0.006)
AM_CONFIG_HEADER(src/config.h)

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_BIGENDIAN
AC_C_CONST
AM_ENABLE_SHARED
AM_PROG_LIBTOOL

dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
 case " $CFLAGS " in
 *[\ \  ]-Wall[\ \      ]*) ;;
 *) CFLAGS="$CFLAGS -Wall " ;;
 esac
fi
changequote([,])dnl

AC_PATH_GENERIC(imlib2, 1.0.0,
 [ have_imlib2="yes" ],
 [
   have_imlib2="no"
   AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in the path?)
 ]
)

dnl Make sure the epeg header/lib is available
AC_PATH_GENERIC(epeg, 0.9.0,
 [
   AC_DEFINE(HAVE_EPEG_H, 1, [Epeg.h is available])
   have_epeg="yes"
 ],
 [
   have_epeg="no"
   AC_MSG_WARN(Cannot find Epeg on your system: jpeg thumbnail suckage!)
 ]
)

dnl Make sure the png header/lib is available
PKG_CHECK_MODULES(PNG, libpng12 >= 1.2.0,
 [
   have_png="yes"
   AC_DEFINE(HAVE_PNG_H, 1, [png.h is available])
 ],
 [
   have_png="no"
   AC_MSG_WARN(Cannot find libpng on your system: png thumbnail suckage!)
 ]
)

AC_PATH_PROG(PERL, perl, 0)
AC_SUBST(PERL)

dnl Make sure the Evas header/lib is available
AC_PATH_GENERIC(evas, 0.9.9,
 [ have_evas="yes" ],
 [
   have_evas="no"
   AC_MSG_ERROR(Cannot find Evas on your system: jpeg thumbnail suckage!)
 ]
)

dnl Make sure the Ecore_Evas header/lib is available
AC_PATH_GENERIC(ecore, 0.9.9,
 [
   SAVE_CFLAGS=$CFLAGS;
   CFLAGS="$CFLAGS $ECORE_CFLAGS"
   AC_CHECK_HEADER(Ecore_Evas.h,      [
       have_ecore="yes"      ], [
have_ecore="no" AC_MSG_ERROR(Cannot find Ecore_Evas on your system: edje thumbnail suckage)
     ]
   )
   CFLAGS=$SAVE_CFLAGS
 ],
 [
   have_ecore="no"
AC_MSG_ERROR(Cannot find Ecore_Evas on your system: jpeg thumbnail suckage!)
 ]
)

dnl Make sure the Edje header/lib is available
AC_PATH_GENERIC(edje, 0.5.0,
 [ have_edje="yes" ],
 [
   have_edje="no"
   AC_MSG_ERROR(Cannot find Edje on your system: edje thumbnail suckage!)
 ]
)

# Build the list of required libs for epsilon.pc.in. Only works for libs
# which install a .pc file of course
if test "x$`evas-config --libs`" != "x"; then
 requirements=evas
fi
if test "x$`ecore-config --libs`" != "x"; then
 requirements="$requirements ecore"
fi
if test "x$`edje-config --libs`" != "x"; then
 requirements="$requirements edje"
fi
     AC_SUBST(requirements)

#####################################################################
## Output

AC_OUTPUT([
Makefile
epsilon.pc
epsilon.spec
epsilon-config
src/Makefile
src/lib/Makefile
src/lib/exiftags/Makefile
src/bin/Makefile
debian/changelog
], [
chmod +x epsilon-config
]
)

echo
echo "Finished configuring $PACKAGE $VERSION"
echo
echo "Support for freedesktop png thumbnailing .... $have_png"
echo "Support for epeg thumbnail extension     .... $have_epeg"
echo
echo "Now type 'make' (gmake on some systems) to compile $PACKAGE"
echo




Quoting Ralf Wildenhues <address@hidden>:

Hello,

* address@hidden wrote on Fri, Apr 28, 2006 at 10:28:37AM CEST:

I have autoconf-2.59 automake-1.9.6 gcc-4.0.3 libtool-1.5.22

I am trying to compile code and get this error

Running autoconf...
configure.in:37: error: possibly undefined macro: AC_DEFINE
     If this token and others are legitimate, please use m4_pattern_allow.
     See the Autoconf documentation.
configure.in:42: error: possibly undefined macro: AC_MSG_WARN

people on other distros don't have that problem with the same code.
I checked for differences in switches and flags for the above listed
packages, but there are none. what i did notice is that they have this:

/usr/share/autoconf/acgeneral.m4

So they have an old Autoconf (<= 2.13).

as compared to what i have:
ls /usr/share/autoconf/
Autom4te  INSTALL  autoconf  autom4te.cfg  autoscan  autotest  m4sugar

So you have a new Autoconf.

Can someone help me?

Maybe the configure.in needs some help to work to function with modern
Autoconf.  Please post it; if it's very long, just post the first 50
lines of it.

Cheers,
Ralf







reply via email to

[Prev in Thread] Current Thread [Next in Thread]