Opened 12 years ago

Last modified 11 years ago

#38582 new enhancement

RFE: update the configure.ac file in base to silence some warnings produced by autoscan

Reported by: cooljeanius (Eric Gallager) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.3
Keywords: haspatch Cc:
Port:

Description

When running autoscan in base, it gives the following warnings:

configure.ac: warning: missing AC_CHECK_FUNCS([dup2]) wanted by: src/machista1.0/tests/libmachista-test.c:76
configure.ac: warning: missing AC_CHECK_FUNCS([getcwd]) wanted by: src/darwintracelib1.0/darwintrace.c:403
configure.ac: warning: missing AC_CHECK_FUNCS([lchown]) wanted by: src/pextlib1.0/Pextlib.c:464
configure.ac: warning: missing AC_CHECK_FUNCS([localtime_r]) wanted by: src/programs/daemondo/main.c:128
configure.ac: warning: missing AC_CHECK_FUNCS([memmove]) wanted by: src/pextlib1.0/filemap.c:746
configure.ac: warning: missing AC_CHECK_FUNCS([mkdir]) wanted by: src/darwintracelib1.0/darwintrace.c:829
configure.ac: warning: missing AC_CHECK_FUNCS([munmap]) wanted by: src/machista1.0/libmachista.c:499
configure.ac: warning: missing AC_CHECK_FUNCS([realpath]) wanted by: src/pextlib1.0/realpath.c:67
configure.ac: warning: missing AC_CHECK_FUNCS([regcomp]) wanted by: src/pextlib1.0/strsed.c:584
configure.ac: warning: missing AC_CHECK_FUNCS([rmdir]) wanted by: src/darwintracelib1.0/darwintrace.c:859
configure.ac: warning: missing AC_CHECK_FUNCS([select]) wanted by: src/darwintracelib1.0/darwintrace.c:209
configure.ac: warning: missing AC_CHECK_FUNCS([setenv]) wanted by: src/pextlib1.0/Pextlib.c:408
configure.ac: warning: missing AC_CHECK_FUNCS([socket]) wanted by: src/darwintracelib1.0/darwintrace.c:359
configure.ac: warning: missing AC_CHECK_FUNCS([strchr]) wanted by: src/machista1.0/machista_wrap.c:1381
configure.ac: warning: missing AC_CHECK_FUNCS([strdup]) wanted by: src/cregistry/entry.c:384
configure.ac: warning: missing AC_CHECK_FUNCS([strerror]) wanted by: src/darwintracelib1.0/darwintrace.c:369
configure.ac: warning: missing AC_CHECK_FUNCS([strrchr]) wanted by: src/pextlib1.0/xinstall.c:466
configure.ac: warning: missing AC_CHECK_FUNCS([strstr]) wanted by: src/machista1.0/machista_wrap.c:1383
configure.ac: warning: missing AC_CHECK_FUNCS([strtol]) wanted by: src/pextlib1.0/Pextlib.c:205
configure.ac: warning: missing AC_CHECK_FUNCS([strtoul]) wanted by: src/machista1.0/machista_wrap.c:1820
configure.ac: warning: missing AC_CHECK_FUNCS([utime]) wanted by: src/pextlib1.0/curl.c:438
configure.ac: warning: missing AC_CHECK_HEADERS([mach/mach.h]) wanted by: src/programs/daemondo/main.c:66
configure.ac: warning: missing AC_CHECK_HEADERS([sys/ioctl.h]) wanted by: src/pextlib1.0/tty.c:41
configure.ac: warning: missing AC_CHECK_HEADERS([sys/mount.h]) wanted by: src/pextlib1.0/xinstall.c:50
configure.ac: warning: missing AC_CHECK_HEADERS([sys/param.h]) wanted by: src/darwintracelib1.0/darwintrace.c:70
configure.ac: warning: missing AC_CHECK_HEADERS([sys/time.h]) wanted by: src/pextlib1.0/sha2.c:38
configure.ac: warning: missing AC_CHECK_HEADER_STDBOOL wanted by: src/machista1.0/libmachista.c:247
configure.ac: warning: missing AC_C_INLINE wanted by: src/darwintracelib1.0/darwintrace.c:136
configure.ac: warning: missing AC_FUNC_CHOWN wanted by: src/pextlib1.0/xinstall.c:1077
configure.ac: warning: missing AC_FUNC_FORK wanted by: src/machista1.0/tests/libmachista-test.c:25
configure.ac: warning: missing AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK wanted by: src/darwintracelib1.0/darwintrace.c:721
configure.ac: warning: missing AC_FUNC_MALLOC wanted by: src/cregistry/entry.c:88
configure.ac: warning: missing AC_FUNC_MMAP wanted by: src/machista1.0/libmachista.c:469
configure.ac: warning: missing AC_FUNC_REALLOC wanted by: src/cregistry/util.c:56
configure.ac: warning: missing AC_PROG_AWK wanted by: portmgr/packaging/buildall.sh:44
configure.ac: warning: missing AC_PROG_RANLIB wanted by: src/cregistry/Makefile:5
configure.ac: warning: missing AC_TYPE_MODE_T wanted by: src/darwintracelib1.0/darwintrace.c:646
configure.ac: warning: missing AC_TYPE_OFF_T wanted by: src/pextlib1.0/flock.c:57
configure.ac: warning: missing AC_TYPE_PID_T wanted by: src/machista1.0/tests/libmachista-test.c:25
configure.ac: warning: missing AC_TYPE_SIZE_T wanted by: src/cregistry/entry.c:376
configure.ac: warning: missing AC_TYPE_SSIZE_T wanted by: src/darwintracelib1.0/darwintrace.c:687
configure.ac: warning: missing AC_TYPE_UID_T wanted by: src/pextlib1.0/Pextlib.c:464
configure.ac: warning: missing AC_TYPE_UINT32_T wanted by: src/machista1.0/hashmap.c:52
configure.ac: warning: missing AC_TYPE_UINT8_T wanted by: src/machista1.0/libmachista.c:87

I'm running the most recent autoscan that MacPorts offers, which is:

gl00b05044:base root# autoscan --version
autoscan (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

Feel free to add as many of the missing macros as you think makes sense.

Attachments (4)

patch-configure.ac.diff (9.4 KB) - added by cooljeanius (Eric Gallager) 12 years ago.
patch to apply to the configure.ac file in base (after that, regenerate the build system with aclocal -I m4, autoheader, and autoconf)
patch-missing.scan.diff (6.5 KB) - added by cooljeanius (Eric Gallager) 11 years ago.
diff between configure.scan results in OP (MacPorts 2.1.3) and current base (MacPorts 2.2.0)
patch-conservatively-configure.ac.diff (1.8 KB) - added by cooljeanius (Eric Gallager) 11 years ago.
patch against 2.2 base's configure.ac that just silences the autoscan warnings
patch-liberally-configure.ac.diff (17.7 KB) - added by cooljeanius (Eric Gallager) 11 years ago.
patch against 2.2 base's configure.ac that includes the changes from the more conservative patch, as well as other macros that I would like to include

Download all attachments as: .zip

Change History (11)

comment:1 Changed 12 years ago by cooljeanius (Eric Gallager)

Attaching a patch next that fixes all of these warnings, plus also makes sure everything is quoted properly, and alphabetizes the header and function checks. (After that the "haspatch" keyword can be added)

Changed 12 years ago by cooljeanius (Eric Gallager)

Attachment: patch-configure.ac.diff added

patch to apply to the configure.ac file in base (after that, regenerate the build system with aclocal -I m4, autoheader, and autoconf)

comment:2 Changed 12 years ago by larryv (Lawrence Velázquez)

Keywords: haspatch added

comment:3 Changed 12 years ago by cooljeanius (Eric Gallager)

Also this depends on #38579

comment:4 Changed 12 years ago by cooljeanius (Eric Gallager)

hm looks like I'll have to update this to include the changes from r104693 now... actually I should probably have done this patch against the configure.ac in trunk in the first place anyway...

comment:5 Changed 12 years ago by jmroot (Joshua Root)

There is absolutely no point adding autoconf checks for this stuff unless we have fallback code for when it's not available. And really, I doubt we care about being that portable.

comment:6 Changed 11 years ago by cooljeanius (Eric Gallager)

I don't think any of these macros can actually fail, so I don't see why they'd need fallback code. They're just for adding more information about the user's system to their config.log and to their config.h (which I guess MacPorts doesn't use, but it could do so easily...). Also it looks like a lot of the macros currently in configure.ac were originally added with an older version of autoscan, this would be just updating those to a more recent version. Anyway I'm planning on editing a table into this post showing more about these macros:

Macro contents of line autoscan is referring to when it says a file wants this macro context (how the line is used) human explanation for how adding the macro will be useful
AC_CHECK_FUNCS([dup2])

(coming back to this later...)

Version 0, edited 11 years ago by cooljeanius (Eric Gallager) (next)

Changed 11 years ago by cooljeanius (Eric Gallager)

Attachment: patch-missing.scan.diff added

diff between configure.scan results in OP (MacPorts 2.1.3) and current base (MacPorts 2.2.0)

Changed 11 years ago by cooljeanius (Eric Gallager)

patch against 2.2 base's configure.ac that just silences the autoscan warnings

Changed 11 years ago by cooljeanius (Eric Gallager)

patch against 2.2 base's configure.ac that includes the changes from the more conservative patch, as well as other macros that I would like to include

comment:7 Changed 11 years ago by cooljeanius (Eric Gallager)

OK I should be done justifying all of these macros by now... there are new patches against the latest base release here now, too.

Note: See TracTickets for help on using tickets.