autoconf
[Top][All Lists]
Advanced

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

Search for an header file in different paths


From: Alessandro Candini
Subject: Search for an header file in different paths
Date: Tue, 18 Oct 2011 16:26:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

I have this configure.ac file:

AC_PREREQ([2.67])
AC_INIT([myapp], [0.2], address@hidden)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
LT_PREREQ([2.2])
LT_INIT([dlopen])
AC_CONFIG_SRCDIR([src/ESM.cpp])
AC_CONFIG_HEADERS([config.h])
AC_DEFINE([ESM_VERSION], ["1.3.2"], [Soil Mapper version])
AC_DEFINE([_EXP], [], [Soil Mapper expiring date macro])
AC_PROG_CXX
AC_CHECK_PROG([bash_shell],[bash -x],[bash -x],,,[/usr/sbin/bash])
AC_PROG_INSTALL
AC_PROG_CXX_C_O
AC_SEARCH_LIBS([pthread_create, pthread_join], [pthread])
AC_SEARCH_LIBS([GDALOpen], [gdal])
PKG_CHECK_MODULES([ESM_GUI], [glibmm-2.4 giomm-2.4 gtkmm-2.4 >= 2.12.2 gtk+-2.0 cairo gthread-2.0 >= 2.0]) AC_CHECK_HEADERS([stdlib.h string.h unistd.h pthread.h gdal.h ogr_srs_api.h])
AC_HEADER_STDBOOL
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_REALLOC
AC_CONFIG_FILES([Makefile
         src/Makefile])
AC_OUTPUT

Before upgrading my Ubuntu linux to 11.10 version, I had gdal.h under /usr/local/include: configure and make succeed without errors. Now I have it under /usr/include/gdal and I get that gdal.h cannot be found (in my source files there is a simple "#include <gdal.h>").

How can I manage the two cases in the same configure.ac: system in which gdal.h is in /usr/include and others in which it is in /usr/local/include?

Thanks in advance,

Caneta




reply via email to

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