[PDF] Using GNU Autotools 16 thg 5 2010 http://





Previous PDF Next PDF



Using GNU Autotools

16 thg 5 2010 http://www.lrde.epita.fr/~adl/autotools.html ... configure probes the systems for required functions



Reactive Synthesis from LTL Specification with Spot

tmichaud@lrde.epita.fr colange@lrde.epita.fr. We present ltlsynt





The Tiger Compiler Project

months for the brave ones) with the constant needs to fix errors found in earlier stages. 1 http://www.epita.fr/. 2 http://tiger.lrde.epita.fr/.



A Morphological Method for Music Score Staff Removal

EPITA Research and Development Laboratory (LRDE) France our C++ image processing library “Milena” ? http://olena.lrde.epita.fr.



Morphology on color images

14 thg 1 2009 mum and infimum operators



DoX – Doc only eXtended

3 AUCTEX support for new documentation items. 5. 4 Conclusion. 6. 5 History. 6. *DoX homepage: http://www.lrde.epita.fr/˜didier/software/latex.php#dox.



A Static C++ Object-Oriented Programming (SCOOP) Paradigm

firstname.lastname@lrde.epita.fr describes this paradigm namely a proposal for “Static C++ Object- ... http://www.cs.technion.ac.il/~yogi/Courses/.





Why and How to Design a Generic and Efficient Image Processing

EPITA Research and Development Laboratory (LRDE) France 1roland.levillain

Foreword

Foreword (1/2)

This presentation targets developers familiar with Unix development tools (shell, make, compiler) that want to learn Autotools. The latest version of this document can be retrieved from http://www.lrde.epita.fr/ ~adl/autotools.html Please mail me corrections and suggestionsabout this documentat adl@gnu.org. Do not send me any general question about the Autotools. Use the appropriate mailing list instead (autoconf@gnu.org, or automake@gnu.org).A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 1 / 162

Tool Versions

Foreword (2/2)

This document was updated for the following releases of the Autotools:

GNU Autoconf 2.65 (November 2009)

GNU Automake 1.11.1 (December 2009)

GNU Libtool 2.2.6b (November 2009)

GNU Gettext 0.17 (November 2007)

These were the last releases at the time of writing.The usage of these tools has improved a lot over the last years.

Some syntaxes used here will not work with older tools.

This a deliberate choice:

New users should learn today's recommended usages. Make sure you have up-to-date tools and do not bother with old releases. A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 2 / 162

Title Page

Using GNU Autotools

Alexandre Duret-Lutz

adl@gnu.org

May 16, 2010

Copyright

c

2010 Alexandre Duret-Lutz

Trivial source code examples displayed in this tutorial (such as the C les,Makele.ams, andcongure.acs of all the `amhello' projects) can be reused as if they were in the public domain. A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 3 / 162

Part I

The GNU Build System

1Goals

Portable Packages

Uniform Builds

2Package Use Cases

The User Point of View

The Power User Point of View

The Packager Point of View

The Maintainer Point of View

3The congure Process

4Why We Need Tools

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 4 / 162

GoalsPortable Packages

Portable Packages

1Goals

Portable Packages

Uniform Builds

2Package Use Cases

The User Point of View

The Power User Point of View

The Packager Point of View

The Maintainer Point of View

3The congure Process

4Why We Need Tools

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 5 / 162

GoalsPortable Packages

Sources of Non-Portability in C

Consider C functions...that do not exist everywhere (e.g.,strtod())that have dierent names (e.g.,strchr()vs.index())that have varying prototypes

(e.g.,int setpgrp(void);vs.int setpgrp(int, int);)that can behave dierently (e.g.,malloc(0);)that might require other libraries

(ispow() inlibm.soor inlibc.so?)that can be dened in dierent headers (string.hvs.strings.hvs.memory.h)

How should a package deal with those?

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 6 / 162

GoalsPortable Packages

Possible Solutions

Slice the code with lots of#if/#elseCreate substitution macros

Create substitution functions

The latter two are to be preferred.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 7 / 162

GoalsPortable Packages

Possible Solutions

Slice the code with lots of#if/#elseCreate substitution macros

Create substitution functions

The latter two are to be preferred.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 7 / 162

GoalsPortable Packages

Code Cluttered with#if/#elseExcerpt of call-1.10'salloctrampoline() #i f! defined (CODEEXECUTABLE) static longpagesize = 0; #i fdefined (EXECUTABLEVIAMMAPDEVZERO) static intzerofd ; #endif i f(! pagesize )f #i fdefined (HAVEMACHVM) pagesize = vmpagesize ; #else pagesize = getpagesize (); #endif #i fdefined (EXECUTABLEVIAMMAPDEVZERO) zerofd = open ("/dev/zero" , ORDONLY,0644); i f( zerofd<0)f f p r i n t f ( stderr , " trampoline :Cannotopen/dev/zero !nn" ); abort (); g #endif g #endif A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 8 / 162

GoalsPortable Packages

Substitution macros

Excerpt of coreutils-5.2.1'ssystem.h#i f! HAVEFSEEKO && ! defined fseeko # definefseeko (s , o , w) ((o) == (long) (o)n ? fseek (s , o , w)n : ( errno = EOVERFLOW,1)) #endifThen usefseeko()whether it exists or not.A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 9 / 162

GoalsPortable Packages

Substitution functions

Ifstrdup()does not exist, link your program with a replacement denition such asstrdup.c(from the GNU C library)char strdup (const chars ) f sizet len = strlen ( s ) + 1; voidnew = malloc ( len ); i f(new == NULL) returnNULL; return(char) memcpy (new , s , len ); g A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 10 / 162

GoalsUniform Builds

Uniform Builds

1Goals

Portable Packages

Uniform Builds

2Package Use Cases

The User Point of View

The Power User Point of View

The Packager Point of View

The Maintainer Point of View

3The congure Process

4Why We Need Tools

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 11 / 162

GoalsUniform Builds

Need for Automatic Conguration

Maintaining a collection of#definefor each system by hand is cumbersome.Requiring users to add the necessary-D,-I, and-lcompilation options toMakeleis burdensome.Complicated builds hinder the acceptance of free software. In 1991 people started to write shell scripts toguessthese settings for some GNU packages.Since then thecongurescript is mandatory in any package of the

GNU project.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 12 / 162

GoalsUniform Builds

Need for Automatic Conguration

Maintaining a collection of#definefor each system by hand is cumbersome.Requiring users to add the necessary-D,-I, and-lcompilation options toMakeleis burdensome.Complicated builds hinder the acceptance of free software. In 1991 people started to write shell scripts toguessthese settings for some GNU packages.Since then thecongurescript is mandatory in any package of the

GNU project.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 12 / 162

GoalsUniform Builds

congure's Purposecongure cong.hMakelesrc/Makele congureprobes the systems for required functions, libraries, and

toolsthen it generates acong.hle with all#definesas well asMakeles to build the packageA. Duret-LutzUsing GNU AutotoolsMay 16, 2010 13 / 162

GoalsUniform Builds

congure's Purposecongure cong.hMakelesrc/Makele congureprobes the systems for required functions, libraries, and

toolsthen it generates acong.hle with all#definesas well asMakeles to build the packageA. Duret-LutzUsing GNU AutotoolsMay 16, 2010 13 / 162

GoalsUniform Builds

congure's Purposecongure cong.hMakelesrc/Makele congureprobes the systems for required functions, libraries, and

toolsthen it generates acong.hle with all#definesas well asMakeles to build the packageA. Duret-LutzUsing GNU AutotoolsMay 16, 2010 13 / 162

GoalsUniform Builds

GNU Coding Standards

http://www.gnu.org/prep/standards/ Practices that packages of the GNU project should follow:program behavior how to report errors, standard command line options, etc. coding style conguration

Makeleconventionsetc.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 14 / 162

GoalsUniform Builds

GNU Coding Standards

http://www.gnu.org/prep/standards/ Practices that packages of the GNU project should follow:program behavior how to report errors, standard command line options, etc. coding style conguration

Makeleconventionsetc.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 14 / 162

GoalsUniform Builds

GNU Coding Standards

http://www.gnu.org/prep/standards/ Practices that packages of the GNU project should follow:program behavior how to report errors, standard command line options, etc. coding style conguration

Makeleconventionsetc.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 14 / 162

GoalsUniform Builds

GNU Coding Standards

http://www.gnu.org/prep/standards/ Practices that packages of the GNU project should follow:program behavior how to report errors, standard command line options, etc. coding style conguration

Makeleconventionsetc.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 14 / 162

GoalsUniform Builds

GNU Coding Standards

http://www.gnu.org/prep/standards/ Practices that packages of the GNU project should follow:program behavior how to report errors, standard command line options, etc. coding style conguration

Makeleconventionsetc.

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 14 / 162

Package Use CasesThe User Point of View

The User Point of View

1Goals

Portable Packages

Uniform Builds

2Package Use Cases

The User Point of View

The Power User Point of View

The Packager Point of View

The Maintainer Point of View

3The congure Process

4Why We Need Tools

A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 15 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Installation Procedure

~ %tar zxf amhello-1.0.tar.gz~ %cd amhello-1.0~/amhello-1.0 %./configure ...~/amhello-1.0 %make ...~/amhello-1.0 %make check ...~/amhello-1.0 %su

Password:/home/adl/amhello-1.0 #make install

.../home/adl/amhello-1.0 #exit~/amhello-1.0 %make installcheck A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 16 / 162

Package Use CasesThe User Point of View

Standard Makele Targets

`make all'Build p rograms,lib raries,do cumentation,etc . (Same as `make'.) `make install'Install what needs to b einstalled. `make install-strip'Same as ` make install', then strip debugging symbols. `make uninstall'The opp ositeof ` make install'. `make clean'Erase what has b eenbuilt (the opp ositeof ` make all'). `make distclean'Additionally erase a nything` ./configure' created. `make check'Run the test suite, if any . `make installcheck'Check the installed p rogramso rlib raries,if supported. `make dist'Create PACKAGE-VERSION.tar.gz.A. Duret-LutzUsing GNU AutotoolsMay 16, 2010 17 / 162

Package Use CasesThe User Point of View

Standard File System Hierarchy

quotesdbs_dbs1.pdfusesText_1
[PDF] http www finaces gov ma

[PDF] http www perfect english grammar com past simple present perfect 1 html

[PDF] http www unaids org fr resources fact sheet

[PDF] http zonelitteraire e monsite com medias files invention ecrire une lettre pdf

[PDF] https //si1d.ac-toulouse.fr dans la rubrique gestion des personnels

[PDF] https e bts men gov ma fr candidature pages candidature aspx

[PDF] https e recrutement finances gov ma

[PDF] https massar men gov ma account login returnurl 2f

[PDF] https moutamadris men gov ma ar pages detailactualite aspx idactu 54

[PDF] https portail agent phm education gouv fr

[PDF] https teleservices ac paris fr

[PDF] https wwwd caf fr wps myportal mobile mon compte droits et paiements mes paiements

[PDF] https://ts.ac-paris.fr/ts bourse

[PDF] huile d'olive france

[PDF] huile de lin et cancer hormono dépendant