autohell to CMake

21 files changed +209 −708

  • + CMakeLists.txt
  • + README.md
  • + cmake/attrConfig.cmake.in
  • + cmake/config.h.in
  • − Makefile.am
  • − README
  • − autogen.sh
  • − configure.ac
  • − doc/INSTALL
  • − doc/Makemodule.am
  • − examples/Makemodule.am
  • − include/Makemodule.am
  • − libattr/Makemodule.am
  • − libmisc/Makemodule.am
  • − m4/visibility_hidden.m4
  • − man/Makemodule.am
  • − man/man1/Makemodule.am
  • − man/man3/Makemodule.am
  • − test/Makemodule.am
  • − tools/Makemodule.am
  • • .gitignore
1diff --git a/.gitignore b/.gitignore
2index 8dbb0f7..aebcb53 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -1,12 +1,5 @@
6 *~
7-*.la
8-*.lo
9-*.mo
10 *.o
11-*.pc
12-.dirstamp
13-.deps/
14-.libs/
15
16 /Logs/
17
18@@ -16,22 +9,4 @@
19 /setfattr
20 /examples/copyattr
21
22-/ABOUT-NLS
23-/aclocal.m4
24-/autom4te.cache/
25-/build-aux/
26-/config.*
27-/configure
28-/configure.lineno
29-/libtool
30-/m4/
31-Makefile
32-Makefile.in
33-stamp-h1
34-
35-*.log
36-*.trs
37-
38-/include/attr
39-/include/config.h
40-/include/config.h.in
41+/build/
42diff --git a/CMakeLists.txt b/CMakeLists.txt
43new file mode 100644
44index 0000000..1be528d
45--- /dev/null
46+++ b/CMakeLists.txt
47@@ -0,0 +1,189 @@
48+cmake_minimum_required(VERSION 3.16)
49+
50+project(attr
51+ VERSION 2.5.2
52+ DESCRIPTION "A library for filesystem extended attribute support"
53+ LANGUAGES C)
54+
55+include(GNUInstallDirs)
56+include(CMakePackageConfigHelpers)
57+include(CheckCSourceCompiles)
58+
59+set(CMAKE_REQUIRED_FLAGS "-Werror")
60+
61+check_c_source_compiles("
62+int foo __attribute__ ((visibility (\"hidden\"))) = 1;
63+int bar __attribute__ ((visibility (\"protected\"))) = 1;
64+int main(void) { return 0; }
65+" HAVE_VISIBILITY_ATTRIBUTE)
66+
67+check_c_source_compiles("
68+void foo (void) {}
69+__typeof(foo) foo __attribute__ ((__symver__(\"foo@foo\")));
70+int main(void) { return 0; }
71+" HAVE_SYMVER_ATTRIBUTE)
72+
73+unset(CMAKE_REQUIRED_FLAGS)
74+
75+if(HAVE_VISIBILITY_ATTRIBUTE)
76+ set(ATTR_EXPORT_DEFINE "__attribute__ ((visibility (\"default\"))) extern")
77+else()
78+ set(ATTR_EXPORT_DEFINE "extern")
79+endif()
80+
81+configure_file(
82+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in"
83+ "${CMAKE_CURRENT_BINARY_DIR}/include/config.h"
84+ @ONLY)
85+
86+# libattr's sources include public headers as <attr/foo.h>; reproduce the
87+# "include/attr -> include" symlink that configure.ac sets up via
88+# AC_CONFIG_COMMANDS so that those includes resolve without installing.
89+file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include")
90+if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/include/attr")
91+ file(CREATE_LINK
92+ "${CMAKE_CURRENT_SOURCE_DIR}/include"
93+ "${CMAKE_CURRENT_BINARY_DIR}/include/attr"
94+ SYMBOLIC)
95+endif()
96+
97+option(BUILD_STATIC "Also build a static library (.a) alongside the shared library" ON)
98+
99+set(ATTR_SOURCES
100+ libattr/attr_copy_action.c
101+ libattr/attr_copy_check.c
102+ libattr/attr_copy_fd.c
103+ libattr/attr_copy_file.c
104+ libattr/libattr.c)
105+
106+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
107+ list(APPEND ATTR_SOURCES libattr/syscalls.c)
108+endif()
109+
110+add_library(attr SHARED ${ATTR_SOURCES})
111+add_library(attr::attr ALIAS attr)
112+
113+set_target_properties(attr PROPERTIES
114+ OUTPUT_NAME attr
115+ C_VISIBILITY_PRESET hidden
116+ VISIBILITY_INLINES_HIDDEN ON)
117+
118+set(ATTR_LT_CURRENT 2)
119+set(ATTR_LT_AGE 1)
120+set(_attr_lt_patch "${PROJECT_VERSION_PATCH}")
121+if(_attr_lt_patch LESS 10)
122+ set(_attr_lt_patch "0${_attr_lt_patch}")
123+endif()
124+set(ATTR_LT_REVISION "${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}${_attr_lt_patch}")
125+math(EXPR ATTR_SOVERSION "${ATTR_LT_CURRENT} - ${ATTR_LT_AGE}")
126+
127+set_target_properties(attr PROPERTIES
128+ VERSION "${ATTR_SOVERSION}.${ATTR_LT_AGE}.${ATTR_LT_REVISION}"
129+ SOVERSION "${ATTR_SOVERSION}")
130+
131+target_include_directories(attr PRIVATE
132+ "${CMAKE_CURRENT_BINARY_DIR}/include"
133+ "${CMAKE_CURRENT_SOURCE_DIR}/include")
134+
135+target_include_directories(attr PUBLIC
136+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
137+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
138+
139+target_compile_definitions(attr PRIVATE
140+ _GNU_SOURCE
141+ SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
142+
143+target_compile_options(attr PRIVATE
144+ -include "${CMAKE_CURRENT_SOURCE_DIR}/libattr/libattr.h")
145+
146+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
147+ target_link_options(attr PRIVATE
148+ "LINKER:--version-script,${CMAKE_CURRENT_SOURCE_DIR}/exports")
149+ set_target_properties(attr PROPERTIES LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/exports")
150+endif()
151+
152+if(BUILD_STATIC)
153+ add_library(attr_static STATIC ${ATTR_SOURCES})
154+ add_library(attr::attr_static ALIAS attr_static)
155+
156+ set_target_properties(attr_static PROPERTIES
157+ OUTPUT_NAME attr
158+ C_VISIBILITY_PRESET hidden
159+ VISIBILITY_INLINES_HIDDEN ON)
160+
161+ target_include_directories(attr_static PRIVATE
162+ "${CMAKE_CURRENT_BINARY_DIR}/include"
163+ "${CMAKE_CURRENT_SOURCE_DIR}/include")
164+
165+ target_include_directories(attr_static PUBLIC
166+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
167+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
168+
169+ target_compile_definitions(attr_static PRIVATE
170+ _GNU_SOURCE
171+ SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
172+
173+ target_compile_options(attr_static PRIVATE
174+ -include "${CMAKE_CURRENT_SOURCE_DIR}/libattr/libattr.h")
175+endif()
176+
177+# public headers
178+
179+set(ATTR_PUBLIC_HEADERS attributes.h error_context.h libattr.h)
180+
181+foreach(_attr_header ${ATTR_PUBLIC_HEADERS})
182+ set(_attr_header_in "${CMAKE_CURRENT_SOURCE_DIR}/include/${_attr_header}")
183+ set(_attr_header_out "${CMAKE_CURRENT_BINARY_DIR}/include/attr-installed/${_attr_header}")
184+ file(READ "${_attr_header_in}" _attr_header_content)
185+ string(REPLACE "EXPORT" "extern" _attr_header_content "${_attr_header_content}")
186+ file(WRITE "${_attr_header_out}" "${_attr_header_content}")
187+ install(FILES "${_attr_header_out}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/attr")
188+endforeach()
189+
190+# install
191+
192+set(ATTR_INSTALL_TARGETS attr)
193+if(BUILD_STATIC)
194+ list(APPEND ATTR_INSTALL_TARGETS attr_static)
195+endif()
196+
197+install(TARGETS ${ATTR_INSTALL_TARGETS}
198+ EXPORT attrTargets
199+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
200+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
201+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
202+
203+install(EXPORT attrTargets
204+ NAMESPACE attr::
205+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/attr")
206+
207+write_basic_package_version_file(
208+ "${CMAKE_CURRENT_BINARY_DIR}/attrConfigVersion.cmake"
209+ VERSION "${PROJECT_VERSION}"
210+ COMPATIBILITY SameMajorVersion)
211+
212+configure_package_config_file(
213+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/attrConfig.cmake.in"
214+ "${CMAKE_CURRENT_BINARY_DIR}/attrConfig.cmake"
215+ INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/attr")
216+
217+install(FILES
218+ "${CMAKE_CURRENT_BINARY_DIR}/attrConfig.cmake"
219+ "${CMAKE_CURRENT_BINARY_DIR}/attrConfigVersion.cmake"
220+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/attr")
221+
222+# pkgconfig
223+
224+set(prefix "${CMAKE_INSTALL_PREFIX}")
225+set(exec_prefix "\${prefix}")
226+set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
227+set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
228+set(PACKAGE_VERSION "${PROJECT_VERSION}")
229+
230+configure_file(
231+ "${CMAKE_CURRENT_SOURCE_DIR}/libattr.pc.in"
232+ "${CMAKE_CURRENT_BINARY_DIR}/libattr.pc"
233+ @ONLY)
234+
235+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libattr.pc"
236+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
237diff --git a/Makefile.am b/Makefile.am
238deleted file mode 100644
239index e5d3f75..0000000
240--- a/Makefile.am
241+++ /dev/null
242@@ -1,36 +0,0 @@
243-ACLOCAL_AMFLAGS = -I m4
244-
245-EXTRA_DIST = \
246- exports
247-
248-SUBDIRS = po
249-
250-AM_CPPFLAGS = \
251- -I$(top_builddir)/include \
252- -I$(top_srcdir)/include \
253- -DLOCALEDIR=\"$(localedir)\" \
254- -DSYSCONFDIR=\"$(sysconfdir)\"
255-
256-pkgconfdir = $(libdir)/pkgconfig
257-
258-pkgconf_DATA = libattr.pc
259-pkginclude_HEADERS =
260-bin_PROGRAMS =
261-lib_LTLIBRARIES =
262-noinst_HEADERS =
263-noinst_LTLIBRARIES =
264-dist_doc_DATA =
265-dist_man_MANS =
266-dist_sysconf_DATA = xattr.conf
267-
268-update-po:
269- $(MAKE) -C po $@
270-
271-include doc/Makemodule.am
272-include examples/Makemodule.am
273-include include/Makemodule.am
274-include libattr/Makemodule.am
275-include libmisc/Makemodule.am
276-include man/Makemodule.am
277-include test/Makemodule.am
278-include tools/Makemodule.am
279diff --git a/README b/README
280deleted file mode 100644
281index aa08608..0000000
282--- a/README
283+++ /dev/null
284@@ -1,10 +0,0 @@
285-Extended attribute package README
286-_________________________________
287-
288-Package home: https://savannah.nongnu.org/projects/attr
289-
290-See the file doc/INSTALL for build, installation and post-
291-install configuration steps.
292-
293-Refer to the xattr(7) manual page for general extended attribute
294-(EA) information and references to other EA manual pages.
295diff --git a/README.md b/README.md
296new file mode 100644
297index 0000000..2af4d79
298--- /dev/null
299+++ b/README.md
300@@ -0,0 +1,5 @@
301+# Extended attribute
302+
303+upstream source: https://savannah.nongnu.org/projects/attr
304+
305+Replaced GNU Autohell, now using CMake.
306diff --git a/autogen.sh b/autogen.sh
307deleted file mode 100755
308index 01b2211..0000000
309--- a/autogen.sh
310+++ /dev/null
311@@ -1,6 +0,0 @@
312-#!/bin/sh -ex
313-po/update-potfiles
314-autopoint --force
315-am_libdir=$(automake --print-libdir)
316-cp "${am_libdir}/INSTALL" doc/
317-exec autoreconf -f -i
318diff --git a/cmake/attrConfig.cmake.in b/cmake/attrConfig.cmake.in
319new file mode 100644
320index 0000000..bdbe57f
321--- /dev/null
322+++ b/cmake/attrConfig.cmake.in
323@@ -0,0 +1,5 @@
324+@PACKAGE_INIT@
325+
326+include("${CMAKE_CURRENT_LIST_DIR}/attrTargets.cmake")
327+
328+check_required_components(attr)
329diff --git a/cmake/config.h.in b/cmake/config.h.in
330new file mode 100644
331index 0000000..86c4363
332--- /dev/null
333+++ b/cmake/config.h.in
334@@ -0,0 +1,9 @@
335+/* Minimal generated configuration header for the libattr CMake build.
336+ Mirrors the subset of include/config.h (normally produced by autoconf)
337+ that libattr's sources actually rely on. */
338+
339+#cmakedefine HAVE_VISIBILITY_ATTRIBUTE 1
340+#cmakedefine HAVE_SYMVER_ATTRIBUTE 1
341+
342+/* Visibility attribute for API symbols */
343+#define EXPORT @ATTR_EXPORT_DEFINE@
344diff --git a/configure.ac b/configure.ac
345deleted file mode 100644
346index 02322c3..0000000
347--- a/configure.ac
348+++ /dev/null
349@@ -1,84 +0,0 @@
350-# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
351-#
352-# This program is free software: you can redistribute it and/or modify it
353-# under the terms of the GNU General Public License as published by
354-# the Free Software Foundation, either version 2 of the License, or
355-# (at your option) any later version.
356-#
357-# This program is distributed in the hope that it will be useful,
358-# but WITHOUT ANY WARRANTY; without even the implied warranty of
359-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
360-# GNU General Public License for more details.
361-#
362-# You should have received a copy of the GNU General Public License
363-# along with this program. If not, see <http://www.gnu.org/licenses/>.
364-#
365-
366-AC_PREREQ([2.69])
367-AC_INIT([attr], [2.5.2], [acl-devel@nongnu.org])
368-AC_CONFIG_AUX_DIR([build-aux])
369-AC_CONFIG_MACRO_DIR([m4])
370-AC_CONFIG_HEADERS([include/config.h])
371-AC_PREFIX_DEFAULT(/usr)
372-
373-AM_INIT_AUTOMAKE([-Wall foreign 1.15 dist-xz subdir-objects])
374-AM_SILENT_RULES([yes])
375-
376-AC_CANONICAL_HOST
377-AC_PROG_CC
378-AM_PROG_CC_C_O
379-AC_USE_SYSTEM_EXTENSIONS
380-AC_C_CONST
381-AC_TYPE_MODE_T
382-AC_FUNC_GCC_VISIBILITY
383-AC_SYS_LARGEFILE
384-
385-AM_PROG_AR
386-LT_INIT
387-
388-AM_GNU_GETTEXT_VERSION([0.18.2])
389-AM_GNU_GETTEXT([external])
390-
391-AC_ARG_ENABLE([debug],
392- [AS_HELP_STRING([--enable-debug], [Enable extra debugging])])
393-AS_IF([test "x$enable_debug" = "xyes"],
394- [CPPFLAGS="$CPPFLAGS -DDEBUG"],
395- [CPPFLAGS="$CPPFLAGS -DNDEBUG"])
396-
397-dnl Automatically increment the revision for every release.
398-set -- $(IFS=.; echo ${PACKAGE_VERSION})
399-AS_IF([test $# -ne 3 -o ${#1} -gt 1 -o ${#2} -gt 1 -o ${#3} -gt 2],
400- [AC_MSG_ERROR([This PACKAGE_VERSION breaks LT_REVISION])])
401-LT_REVISION=$(printf "%d%d%02d" "$1" "$2" "$3")
402-AC_SUBST(LT_REVISION)
403-
404-AS_CASE([$host_os],
405- [linux*], [os_linux=yes])
406-AM_CONDITIONAL([OS_LINUX], [test "x$os_linux" = "xyes"])
407-
408-AC_CACHE_CHECK(whether __attribute__((__symver__())) is supported,
409- gcc_cv_symver_attribute,
410- [cat > conftest.c <<EOF
411-void foo (void) {}
412-__typeof(foo) foo __attribute__ ((__symver__("foo@foo")));
413-EOF
414- gcc_cv_symver_attribute=no
415- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then \
416- gcc_cv_symver_attribute=yes
417- fi
418- rm -f conftest.[cs]
419-])
420-AS_IF([test $gcc_cv_symver_attribute = yes],
421- [AC_DEFINE(HAVE_SYMVER_ATTRIBUTE, [], [GCC supports symver attribute])])
422-
423-AC_CONFIG_COMMANDS([include/attr],
424- [dnl
425- rm -rf include/attr
426- $as_ln_s "$ac_abs_top_srcdir/include" include/attr
427- ])
428-AC_CONFIG_FILES([
429- libattr.pc
430- Makefile
431- po/Makefile.in
432-])
433-AC_OUTPUT
434diff --git a/doc/INSTALL b/doc/INSTALL
435deleted file mode 100644
436index e82fd21..0000000
437--- a/doc/INSTALL
438+++ /dev/null
439@@ -1,368 +0,0 @@
440-Installation Instructions
441-*************************
442-
443- Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
444-Software Foundation, Inc.
445-
446- Copying and distribution of this file, with or without modification,
447-are permitted in any medium without royalty provided the copyright
448-notice and this notice are preserved. This file is offered as-is,
449-without warranty of any kind.
450-
451-Basic Installation
452-==================
453-
454- Briefly, the shell command './configure && make && make install'
455-should configure, build, and install this package. The following
456-more-detailed instructions are generic; see the 'README' file for
457-instructions specific to this package. Some packages provide this
458-'INSTALL' file but do not implement all of the features documented
459-below. The lack of an optional feature in a given package is not
460-necessarily a bug. More recommendations for GNU packages can be found
461-in *note Makefile Conventions: (standards)Makefile Conventions.
462-
463- The 'configure' shell script attempts to guess correct values for
464-various system-dependent variables used during compilation. It uses
465-those values to create a 'Makefile' in each directory of the package.
466-It may also create one or more '.h' files containing system-dependent
467-definitions. Finally, it creates a shell script 'config.status' that
468-you can run in the future to recreate the current configuration, and a
469-file 'config.log' containing compiler output (useful mainly for
470-debugging 'configure').
471-
472- It can also use an optional file (typically called 'config.cache' and
473-enabled with '--cache-file=config.cache' or simply '-C') that saves the
474-results of its tests to speed up reconfiguring. Caching is disabled by
475-default to prevent problems with accidental use of stale cache files.
476-
477- If you need to do unusual things to compile the package, please try
478-to figure out how 'configure' could check whether to do them, and mail
479-diffs or instructions to the address given in the 'README' so they can
480-be considered for the next release. If you are using the cache, and at
481-some point 'config.cache' contains results you don't want to keep, you
482-may remove or edit it.
483-
484- The file 'configure.ac' (or 'configure.in') is used to create
485-'configure' by a program called 'autoconf'. You need 'configure.ac' if
486-you want to change it or regenerate 'configure' using a newer version of
487-'autoconf'.
488-
489- The simplest way to compile this package is:
490-
491- 1. 'cd' to the directory containing the package's source code and type
492- './configure' to configure the package for your system.
493-
494- Running 'configure' might take a while. While running, it prints
495- some messages telling which features it is checking for.
496-
497- 2. Type 'make' to compile the package.
498-
499- 3. Optionally, type 'make check' to run any self-tests that come with
500- the package, generally using the just-built uninstalled binaries.
501-
502- 4. Type 'make install' to install the programs and any data files and
503- documentation. When installing into a prefix owned by root, it is
504- recommended that the package be configured and built as a regular
505- user, and only the 'make install' phase executed with root
506- privileges.
507-
508- 5. Optionally, type 'make installcheck' to repeat any self-tests, but
509- this time using the binaries in their final installed location.
510- This target does not install anything. Running this target as a
511- regular user, particularly if the prior 'make install' required
512- root privileges, verifies that the installation completed
513- correctly.
514-
515- 6. You can remove the program binaries and object files from the
516- source code directory by typing 'make clean'. To also remove the
517- files that 'configure' created (so you can compile the package for
518- a different kind of computer), type 'make distclean'. There is
519- also a 'make maintainer-clean' target, but that is intended mainly
520- for the package's developers. If you use it, you may have to get
521- all sorts of other programs in order to regenerate files that came
522- with the distribution.
523-
524- 7. Often, you can also type 'make uninstall' to remove the installed
525- files again. In practice, not all packages have tested that
526- uninstallation works correctly, even though it is required by the
527- GNU Coding Standards.
528-
529- 8. Some packages, particularly those that use Automake, provide 'make
530- distcheck', which can by used by developers to test that all other
531- targets like 'make install' and 'make uninstall' work correctly.
532- This target is generally not run by end users.
533-
534-Compilers and Options
535-=====================
536-
537- Some systems require unusual options for compilation or linking that
538-the 'configure' script does not know about. Run './configure --help'
539-for details on some of the pertinent environment variables.
540-
541- You can give 'configure' initial values for configuration parameters
542-by setting variables in the command line or in the environment. Here is
543-an example:
544-
545- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
546-
547- *Note Defining Variables::, for more details.
548-
549-Compiling For Multiple Architectures
550-====================================
551-
552- You can compile the package for more than one kind of computer at the
553-same time, by placing the object files for each architecture in their
554-own directory. To do this, you can use GNU 'make'. 'cd' to the
555-directory where you want the object files and executables to go and run
556-the 'configure' script. 'configure' automatically checks for the source
557-code in the directory that 'configure' is in and in '..'. This is known
558-as a "VPATH" build.
559-
560- With a non-GNU 'make', it is safer to compile the package for one
561-architecture at a time in the source code directory. After you have
562-installed the package for one architecture, use 'make distclean' before
563-reconfiguring for another architecture.
564-
565- On MacOS X 10.5 and later systems, you can create libraries and
566-executables that work on multiple system types--known as "fat" or
567-"universal" binaries--by specifying multiple '-arch' options to the
568-compiler but only a single '-arch' option to the preprocessor. Like
569-this:
570-
571- ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
572- CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
573- CPP="gcc -E" CXXCPP="g++ -E"
574-
575- This is not guaranteed to produce working output in all cases, you
576-may have to build one architecture at a time and combine the results
577-using the 'lipo' tool if you have problems.
578-
579-Installation Names
580-==================
581-
582- By default, 'make install' installs the package's commands under
583-'/usr/local/bin', include files under '/usr/local/include', etc. You
584-can specify an installation prefix other than '/usr/local' by giving
585-'configure' the option '--prefix=PREFIX', where PREFIX must be an
586-absolute file name.
587-
588- You can specify separate installation prefixes for
589-architecture-specific files and architecture-independent files. If you
590-pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
591-PREFIX as the prefix for installing programs and libraries.
592-Documentation and other data files still use the regular prefix.
593-
594- In addition, if you use an unusual directory layout you can give
595-options like '--bindir=DIR' to specify different values for particular
596-kinds of files. Run 'configure --help' for a list of the directories
597-you can set and what kinds of files go in them. In general, the default
598-for these options is expressed in terms of '${prefix}', so that
599-specifying just '--prefix' will affect all of the other directory
600-specifications that were not explicitly provided.
601-
602- The most portable way to affect installation locations is to pass the
603-correct locations to 'configure'; however, many packages provide one or
604-both of the following shortcuts of passing variable assignments to the
605-'make install' command line to change installation locations without
606-having to reconfigure or recompile.
607-
608- The first method involves providing an override variable for each
609-affected directory. For example, 'make install
610-prefix=/alternate/directory' will choose an alternate location for all
611-directory configuration variables that were expressed in terms of
612-'${prefix}'. Any directories that were specified during 'configure',
613-but not in terms of '${prefix}', must each be overridden at install time
614-for the entire installation to be relocated. The approach of makefile
615-variable overrides for each directory variable is required by the GNU
616-Coding Standards, and ideally causes no recompilation. However, some
617-platforms have known limitations with the semantics of shared libraries
618-that end up requiring recompilation when using this method, particularly
619-noticeable in packages that use GNU Libtool.
620-
621- The second method involves providing the 'DESTDIR' variable. For
622-example, 'make install DESTDIR=/alternate/directory' will prepend
623-'/alternate/directory' before all installation names. The approach of
624-'DESTDIR' overrides is not required by the GNU Coding Standards, and
625-does not work on platforms that have drive letters. On the other hand,
626-it does better at avoiding recompilation issues, and works well even
627-when some directory options were not specified in terms of '${prefix}'
628-at 'configure' time.
629-
630-Optional Features
631-=================
632-
633- If the package supports it, you can cause programs to be installed
634-with an extra prefix or suffix on their names by giving 'configure' the
635-option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
636-
637- Some packages pay attention to '--enable-FEATURE' options to
638-'configure', where FEATURE indicates an optional part of the package.
639-They may also pay attention to '--with-PACKAGE' options, where PACKAGE
640-is something like 'gnu-as' or 'x' (for the X Window System). The
641-'README' should mention any '--enable-' and '--with-' options that the
642-package recognizes.
643-
644- For packages that use the X Window System, 'configure' can usually
645-find the X include and library files automatically, but if it doesn't,
646-you can use the 'configure' options '--x-includes=DIR' and
647-'--x-libraries=DIR' to specify their locations.
648-
649- Some packages offer the ability to configure how verbose the
650-execution of 'make' will be. For these packages, running './configure
651---enable-silent-rules' sets the default to minimal output, which can be
652-overridden with 'make V=1'; while running './configure
653---disable-silent-rules' sets the default to verbose, which can be
654-overridden with 'make V=0'.
655-
656-Particular systems
657-==================
658-
659- On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
660-is not installed, it is recommended to use the following options in
661-order to use an ANSI C compiler:
662-
663- ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
664-
665-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
666-
667- HP-UX 'make' updates targets which have the same timestamps as their
668-prerequisites, which makes it generally unusable when shipped generated
669-files such as 'configure' are involved. Use GNU 'make' instead.
670-
671- On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
672-parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
673-workaround. If GNU CC is not installed, it is therefore recommended to
674-try
675-
676- ./configure CC="cc"
677-
678-and if that doesn't work, try
679-
680- ./configure CC="cc -nodtk"
681-
682- On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
683-directory contains several dysfunctional programs; working variants of
684-these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
685-in your 'PATH', put it _after_ '/usr/bin'.
686-
687- On Haiku, software installed for all users goes in '/boot/common',
688-not '/usr/local'. It is recommended to use the following options:
689-
690- ./configure --prefix=/boot/common
691-
692-Specifying the System Type
693-==========================
694-
695- There may be some features 'configure' cannot figure out
696-automatically, but needs to determine by the type of machine the package
697-will run on. Usually, assuming the package is built to be run on the
698-_same_ architectures, 'configure' can figure that out, but if it prints
699-a message saying it cannot guess the machine type, give it the
700-'--build=TYPE' option. TYPE can either be a short name for the system
701-type, such as 'sun4', or a canonical name which has the form:
702-
703- CPU-COMPANY-SYSTEM
704-
705-where SYSTEM can have one of these forms:
706-
707- OS
708- KERNEL-OS
709-
710- See the file 'config.sub' for the possible values of each field. If
711-'config.sub' isn't included in this package, then this package doesn't
712-need to know the machine type.
713-
714- If you are _building_ compiler tools for cross-compiling, you should
715-use the option '--target=TYPE' to select the type of system they will
716-produce code for.
717-
718- If you want to _use_ a cross compiler, that generates code for a
719-platform different from the build platform, you should specify the
720-"host" platform (i.e., that on which the generated programs will
721-eventually be run) with '--host=TYPE'.
722-
723-Sharing Defaults
724-================
725-
726- If you want to set default values for 'configure' scripts to share,
727-you can create a site shell script called 'config.site' that gives
728-default values for variables like 'CC', 'cache_file', and 'prefix'.
729-'configure' looks for 'PREFIX/share/config.site' if it exists, then
730-'PREFIX/etc/config.site' if it exists. Or, you can set the
731-'CONFIG_SITE' environment variable to the location of the site script.
732-A warning: not all 'configure' scripts look for a site script.
733-
734-Defining Variables
735-==================
736-
737- Variables not defined in a site shell script can be set in the
738-environment passed to 'configure'. However, some packages may run
739-configure again during the build, and the customized values of these
740-variables may be lost. In order to avoid this problem, you should set
741-them in the 'configure' command line, using 'VAR=value'. For example:
742-
743- ./configure CC=/usr/local2/bin/gcc
744-
745-causes the specified 'gcc' to be used as the C compiler (unless it is
746-overridden in the site shell script).
747-
748-Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
749-Autoconf limitation. Until the limitation is lifted, you can use this
750-workaround:
751-
752- CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
753-
754-'configure' Invocation
755-======================
756-
757- 'configure' recognizes the following options to control how it
758-operates.
759-
760-'--help'
761-'-h'
762- Print a summary of all of the options to 'configure', and exit.
763-
764-'--help=short'
765-'--help=recursive'
766- Print a summary of the options unique to this package's
767- 'configure', and exit. The 'short' variant lists options used only
768- in the top level, while the 'recursive' variant lists options also
769- present in any nested packages.
770-
771-'--version'
772-'-V'
773- Print the version of Autoconf used to generate the 'configure'
774- script, and exit.
775-
776-'--cache-file=FILE'
777- Enable the cache: use and save the results of the tests in FILE,
778- traditionally 'config.cache'. FILE defaults to '/dev/null' to
779- disable caching.
780-
781-'--config-cache'
782-'-C'
783- Alias for '--cache-file=config.cache'.
784-
785-'--quiet'
786-'--silent'
787-'-q'
788- Do not print messages saying which checks are being made. To
789- suppress all normal output, redirect it to '/dev/null' (any error
790- messages will still be shown).
791-
792-'--srcdir=DIR'
793- Look for the package's source code in directory DIR. Usually
794- 'configure' can determine that directory automatically.
795-
796-'--prefix=DIR'
797- Use DIR as the installation prefix. *note Installation Names:: for
798- more details, including other options available for fine-tuning the
799- installation locations.
800-
801-'--no-create'
802-'-n'
803- Run the configure checks, but stop before creating any output
804- files.
805-
806-'configure' also accepts some other, not widely useful, options. Run
807-'configure --help' for more details.
808diff --git a/doc/Makemodule.am b/doc/Makemodule.am
809deleted file mode 100644
810index 3733dd0..0000000
811--- a/doc/Makemodule.am
812+++ /dev/null
813@@ -1,6 +0,0 @@
814-dist_doc_DATA += \
815- doc/CHANGES \
816- doc/COPYING \
817- doc/COPYING.LGPL
818-EXTRA_DIST += \
819- %D%/INSTALL
820diff --git a/examples/Makemodule.am b/examples/Makemodule.am
821deleted file mode 100644
822index 895346d..0000000
823--- a/examples/Makemodule.am
824+++ /dev/null
825@@ -1,3 +0,0 @@
826-EXTRA_DIST += \
827- examples/copyattr.c \
828- examples/Makefile
829diff --git a/include/Makemodule.am b/include/Makemodule.am
830deleted file mode 100644
831index 3531fa1..0000000
832--- a/include/Makemodule.am
833+++ /dev/null
834@@ -1,31 +0,0 @@
835-noinst_HEADERS += \
836- include/attributes.h \
837- include/error_context.h \
838- include/libattr.h \
839- include/misc.h \
840- include/nls.h \
841- include/walk_tree.h
842-
843-
844-SUBST_INSTALL_HEADER = \
845- subst_install_header() { \
846- file=`echo "$$1" | sed -e 's,^.*/,,'`; \
847- $(SED) -e "s/\<EXPORT\>/extern/" < "$$1" > "include/$$file.t" || exit 1; \
848- $(MKDIR_P) "$$2" || exit 1; \
849- $(INSTALL_HEADER) "include/$$file.t" "$$2/$$file" || exit 1; \
850- $(RM) "include/$$file.t"; \
851- }; \
852- subst_install_header
853-
854-install-attributes_h: include/attributes.h
855- $(SUBST_INSTALL_HEADER) "$<" "$(DESTDIR)$(pkgincludedir)"
856-install-error_context_h: include/error_context.h
857- $(SUBST_INSTALL_HEADER) "$<" "$(DESTDIR)$(pkgincludedir)"
858-install-libattr_h: include/libattr.h
859- $(SUBST_INSTALL_HEADER) "$<" "$(DESTDIR)$(pkgincludedir)"
860-install-data-local: install-attributes_h install-error_context_h install-libattr_h
861-uninstall-local:
862- -rm -f \
863- "$(DESTDIR)$(pkgincludedir)/attributes.h" \
864- "$(DESTDIR)$(pkgincludedir)/error_context.h" \
865- "$(DESTDIR)$(pkgincludedir)/libattr.h"
866diff --git a/libattr/Makemodule.am b/libattr/Makemodule.am
867deleted file mode 100644
868index 545da7c..0000000
869--- a/libattr/Makemodule.am
870+++ /dev/null
871@@ -1,30 +0,0 @@
872-lib_LTLIBRARIES += libattr.la
873-
874-# No other library exports version info, otherwise we'd have to add
875-# "libattr_" prefix to all these variables.
876-LT_CURRENT = 2
877-# The configure script will set this for us automatically.
878-#LT_REVISION =
879-LT_AGE = 1
880-LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
881-
882-## Since libattr translates its error messages, we have to link libintl.
883-## See the AM_GNU_GETTEXT documentation for details.
884-libattr_la_LIBADD = $(LTLIBINTL)
885-libattr_la_DEPENDENCIES = \
886- exports
887-libattr_la_SOURCES = \
888- libattr/attr_copy_action.c \
889- libattr/attr_copy_check.c \
890- libattr/attr_copy_fd.c \
891- libattr/attr_copy_file.c \
892- libattr/libattr.c \
893- libattr/libattr.h
894-if OS_LINUX
895-libattr_la_SOURCES += \
896- libattr/syscalls.c
897-endif
898-libattr_la_CFLAGS = -include libattr/libattr.h
899-libattr_la_LDFLAGS = \
900- -Wl,--version-script,$(top_srcdir)/exports \
901- -version-info $(LTVERSION)
902diff --git a/libmisc/Makemodule.am b/libmisc/Makemodule.am
903deleted file mode 100644
904index d784622..0000000
905--- a/libmisc/Makemodule.am
906+++ /dev/null
907@@ -1,8 +0,0 @@
908-noinst_LTLIBRARIES += libmisc.la
909-
910-libmisc_la_SOURCES = \
911- libmisc/high_water_alloc.c \
912- libmisc/next_line.c \
913- libmisc/quote.c \
914- libmisc/unquote.c \
915- libmisc/walk_tree.c
916diff --git a/m4/visibility_hidden.m4 b/m4/visibility_hidden.m4
917deleted file mode 100644
918index dbd57d4..0000000
919--- a/m4/visibility_hidden.m4
920+++ /dev/null
921@@ -1,40 +0,0 @@
922-dnl Copyright (C) 2003, 2008 Silicon Graphics, Inc.
923-dnl
924-dnl This program is free software: you can redistribute it and/or modify it
925-dnl under the terms of the GNU General Public License as published by
926-dnl the Free Software Foundation, either version 2 of the License, or
927-dnl (at your option) any later version.
928-dnl
929-dnl This program is distributed in the hope that it will be useful,
930-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
931-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
932-dnl GNU General Public License for more details.
933-dnl
934-dnl You should have received a copy of the GNU General Public License
935-dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
936-AC_DEFUN([AC_FUNC_GCC_VISIBILITY],
937- [AC_CACHE_CHECK(whether __attribute__((visibility())) is supported,
938- libc_cv_visibility_attribute,
939- [cat > conftest.c <<EOF
940- int foo __attribute__ ((visibility ("hidden"))) = 1;
941- int bar __attribute__ ((visibility ("protected"))) = 1;
942-EOF
943- libc_cv_visibility_attribute=no
944- if ${CC-cc} -Werror -S conftest.c -o conftest.s \
945- >/dev/null 2>&1; then
946- if grep '\.hidden.*foo' conftest.s >/dev/null; then
947- if grep '\.protected.*bar' conftest.s >/dev/null; then
948- libc_cv_visibility_attribute=yes
949- fi
950- fi
951- fi
952- rm -f conftest.[cs]
953- ])
954- if test $libc_cv_visibility_attribute = yes; then
955- AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE, [], [GCC supports visibility attributes])
956- AC_DEFINE(EXPORT, [__attribute__ ((visibility ("default"))) extern], [Visibility attribute for API symbols])
957- CFLAGS="${CFLAGS} -fvisibility=hidden"
958- else
959- AC_DEFINE(EXPORT, [extern], [Visibility attribute for API symbols])
960- fi
961- ])
962diff --git a/man/Makemodule.am b/man/Makemodule.am
963deleted file mode 100644
964index c3c64ad..0000000
965--- a/man/Makemodule.am
966+++ /dev/null
967@@ -1,24 +0,0 @@
968-include man/man1/Makemodule.am
969-include man/man3/Makemodule.am
970-
971-# Support installing symlinks for man pages that cover multiple interfaces.
972-install-data-hook:
973- set -e; \
974- cd "$(DESTDIR)$(mandir)"; \
975- for d in $(dist_man_MANS); do \
976- man_section=$${d##*.}; \
977- d=$${d#man/}; \
978- dst=$${d##*/}; \
979- for m in `$(AWK) \
980- '/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
981- | $(SED) \
982- -e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
983- -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
984- do \
985- [ "$$m" = "\\" ] && continue; \
986- ln="man$$man_section/$$m.$$man_section"; \
987- [ -e "$$ln" ] && continue; \
988- echo $(LN_S) $$dst $$ln; \
989- $(LN_S) $$dst $$ln; \
990- done; \
991- done
992diff --git a/man/man1/Makemodule.am b/man/man1/Makemodule.am
993deleted file mode 100644
994index 0d054f2..0000000
995--- a/man/man1/Makemodule.am
996+++ /dev/null
997@@ -1,4 +0,0 @@
998-dist_man_MANS += \
999- man/man1/attr.1 \
1000- man/man1/getfattr.1 \
1001- man/man1/setfattr.1
1002diff --git a/man/man3/Makemodule.am b/man/man3/Makemodule.am
1003deleted file mode 100644
1004index e0d461b..0000000
1005--- a/man/man3/Makemodule.am
1006+++ /dev/null
1007@@ -1,6 +0,0 @@
1008-dist_man_MANS += \
1009- man/man3/attr_get.3 \
1010- man/man3/attr_list.3 \
1011- man/man3/attr_multi.3 \
1012- man/man3/attr_remove.3 \
1013- man/man3/attr_set.3
1014diff --git a/test/Makemodule.am b/test/Makemodule.am
1015deleted file mode 100644
1016index 8bfadb9..0000000
1017--- a/test/Makemodule.am
1018+++ /dev/null
1019@@ -1,13 +0,0 @@
1020-TESTS = \
1021- test/attr.test \
1022- test/root/getfattr.test
1023-
1024-EXTRA_DIST += \
1025- test/README \
1026- test/run \
1027- test/sort-getfattr-output \
1028- $(TESTS)
1029-
1030-# Make sure translations don't break tests when matching output.
1031-AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH"; export LC_MESSAGES=C;
1032-TEST_LOG_COMPILER = $(srcdir)/test/run
1033diff --git a/tools/Makemodule.am b/tools/Makemodule.am
1034deleted file mode 100644
1035index 6bb99e0..0000000
1036--- a/tools/Makemodule.am
1037+++ /dev/null
1038@@ -1,13 +0,0 @@
1039-tools_ldadd = $(LDADD) libattr.la libmisc.la $(LTLIBINTL)
1040-
1041-bin_PROGRAMS += attr
1042-attr_SOURCES = tools/attr.c
1043-attr_LDADD = $(tools_ldadd)
1044-
1045-bin_PROGRAMS += getfattr
1046-getfattr_SOURCES = tools/getfattr.c
1047-getfattr_LDADD = $(tools_ldadd)
1048-
1049-bin_PROGRAMS += setfattr
1050-setfattr_SOURCES = tools/setfattr.c
1051-setfattr_LDADD = $(tools_ldadd)