Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
f9373e4a
Commit
f9373e4a
authored
Oct 26, 2012
by
Alexandre Duret-Lutz
Browse files
* m4/ax_prefix_config_h.m4: Update to more recent version.
parent
e2ed5f6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
m4/ax_prefix_config_h.m4
View file @
f9373e4a
# ===========================================================================
#
http:/
/autoconf-archive
.cryp.to
/ax_prefix_config_h.html
#
http://www.gnu.org/software
/autoconf-archive/ax_prefix_config_h.html
# ===========================================================================
#
# SYNOPSIS
...
...
@@ -68,10 +68,10 @@
# it by itself". You might want to clean up about these - consider an
# extra mylib/conf.h that reads something like:
#
#
#include <mylib/_config.h>
#
#ifndef _testpkg_const
#
#define _testpkg_const const
#
#endif
# #include <mylib/_config.h>
# #ifndef _testpkg_const
# #define _testpkg_const const
# #endif
#
# and then start using _testpkg_const in the header files. That is also a
# good thing to differentiate whether some library-user has starting to
...
...
@@ -87,11 +87,7 @@
# #define _testpkg_const const
# #endif
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2008 Marten Svantesson
...
...
@@ -99,7 +95,7 @@
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version
2
of the License, or (at your
# Free Software Foundation; either version
3
of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
...
...
@@ -119,11 +115,14 @@
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Macro Archive. When you make and
# distribute a modified version of the Autoconf Macro, you may extend this
# special exception to the GPL to apply to your modified version as well.
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 11
AC_DEFUN([AX_PREFIX_CONFIG_H],[dnl
AC_PREREQ([2.62])
AC_BEFORE([AC_CONFIG_HEADERS],[$0])dnl
AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
...
...
@@ -167,14 +166,14 @@ else
fi fi
AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
if test -f $_INP ; then
echo
"s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script
echo
"s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script
echo
"s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1
\\" >> _script
echo
"@%:@def[]ine $_UPP""_\\1
\\2
\\" >> _script
echo
"@%:@endif/" >>_script
echo
"s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1
\\" >> _script
echo
"@%:@define $_LOW""_\\1
\\2
\\" >> _script
echo
"@%:@endif/" >> _script
AS_ECHO([
"s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/"
])
> _script
AS_ECHO([
"s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/"
])
>> _script
AS_ECHO([
"s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1\\"
])
>> _script
AS_ECHO([
"@%:@def[]ine $_UPP""_\\1\\2\\"
])
>> _script
AS_ECHO([
"@%:@endif/"
])
>>
_script
AS_ECHO([
"s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1\\"
])
>> _script
AS_ECHO([
"@%:@define $_LOW""_\\1\\2\\"
])
>> _script
AS_ECHO([
"@%:@endif/"
])
>> _script
# now executing _script on _DEF input to create _OUT output file
echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
...
...
@@ -207,12 +206,3 @@ AS_VAR_POPDEF([_PKG])dnl
AS_VAR_POPDEF([_DEF])dnl
AS_VAR_POPDEF([_OUT])dnl
],[PACKAGE="$PACKAGE"])])
dnl implementation note: a bug report (31.5.2005) from Marten Svantesson points
dnl out a problem where `echo "\1"` results in a Control-A. The unix standard
dnl http://www.opengroup.org/onlinepubs/000095399/utilities/echo.html
dnl defines all backslash-sequences to be inherently non-portable asking
dnl for replacement mit printf. Some old systems had problems with that
dnl one either. However, the latest libtool (!) release does export an $ECHO
dnl (and $echo) that does the right thing - just one question is left: what
dnl was the first version to have it? Is it greater 2.58 ?
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment