NetBSD-Users archive

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

Re: getconf LONG_BIT in NetBSD





On 5/20/24 19:16, Greg A. Woods wrote:
At Sun, 19 May 2024 22:08:27 +0200, Ramiro Aceves <ea1abz%gmail.com@localhost> wrote:
Subject: getconf LONG_BIT in NetBSD

I have been playing with an autoconf
./configure script that I want get running
in several OSes. The script uses "getconf
LONG_BIT" to get the bits of the system.

What is the purpose of this test in the context where it is needed?

I would think that if it's a C program then there's no need ever for any
autoconf test.  Just write pure portable C that uses <limits.h> properly.

Hello Greg, thanks for answering.

If you want to take a look:

https://www.sm5bsz.com/linuxdsp/archive/lir05-02.zip


It is a very good SDR radio receiver program. It works in Linux and in Windows (MinGW) with several commercial radio receivers.

configure.ac:


AC_PREREQ(2.50)
AC_INIT(xmain.c)
AC_MSG_CHECKING([OS])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([ft245.c])
BITS=`(getconf LONG_BIT)`

...

3630 lines of very long configure.ac script that uses $BITS variable several times to make some decisions.
...
...
...

Regards.

Ramiro.






--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>


Home | Main Index | Thread Index | Old Index