Hi,
I would like to propose a small improvement to make lgeneral compatible with modern MacOS X.
There is a small bug in ./configure script with 'mkdir check'
==> ./configure --prefix=/opt/homebrew/Cellar/lgeneral/1.4.4 --libdir=/opt/homebrew/Cellar/lgeneral/1.4.4/lib --disable-sdltest
==> make install
Last 15 lines from /Users/koryaga/Library/Logs/Homebrew/lgeneral/02.make:
../config.h:566:12: fatal error: 'direct.h' file not found
# include <direct.h>
^~~~~~~~~~
In file included from portability.c:27:
../config.h:566:12: fatal error: 'direct.h' file not found
# include <direct.h>
^~~~~~~~~~
1 error generated.
make[1]: *** [paths.o] Error 1
make[1]: *** Waiting for unfinished jobs....
1 error generated.
1 error generated.
make[1]: *** [portability.o] Error 1
make[1]: *** [localize.o] Error 1
make: *** [install-recursive] Error 1
The problem is absence of extra header which is needed for Mac OS (#include <sys stat.h="">).
Is it possible to add it to configure.ac? I believe it is safe for other platforms as well (Linux, BSD)</sys>
38c38
< AC_TRY_COMPILE([#include <unistd.h>], [mkdir("test", 0777)], [ac_mkdir_perm_broken=no])
---
> AC_TRY_COMPILE([#include <unistd.h>,#include <sys/stat.h>], [mkdir("test", 0777)], [ac_mkdir_perm_broken=no])
I am trying to add lgeneral to homebrew infrastructure, and this small defects is a blocker for that.
https://github.com/Homebrew/homebrew-core/pull/102434#discussion_r886969209
Thank you.
using stat.h compiles fine for me so I applied it, thanks