Skip to content

Commit 335e200

Browse files
authored
Merge pull request #3780 from smoe/other_os
d/configure: Prepare for execution on other OS
2 parents acff411 + 518e6b5 commit 335e200

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

debian/configure

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22
# dpkg configuration script for linuxcnc
3-
# Copyright (C) 2006 Jeff Epler
3+
# Copyright (C) 2006 Jeff Epler
4+
# 2025-2026 Steffen Moeller
45
#
56
# This program is free software; you can redistribute it and/or modify
67
# it under the terms of the GNU General Public License as published by
@@ -12,6 +13,32 @@
1213

1314
set -e
1415

16+
if [[ -z "$OSTYPE" ]]; then
17+
echo "E: The 'OSTYPE' environment variable is not set."
18+
echo " Failure to confirm Linux as the operating system cannot be determined."
19+
exit 1
20+
else
21+
echo "D: Found operating system '$OSTYPE'."
22+
if [[ ! "$OSTYPE" == "linux-gnu"* ]]; then
23+
echo "W: LinuxCNC is not (yet) prepared for the operating system '$OSTYPE'."
24+
if [[ "$OSTYPE" == "freebsd"* ]]; then
25+
echo " For FreeBSD there have been reports for LinuxCNC to compile and be executable."
26+
else
27+
if [[ "$OSTYPE" == "darwin"* ]]; then
28+
echo
29+
echo " LinuxCNC is yet unlikely to be successfully built on MacOS because of missing dependencies."
30+
if command -v brew &> /dev/null; then
31+
echo " With brew, we are aware of packages"
32+
echo " autoconf automake libusb libmodbus libtircp pkgconf"
33+
echo " but missing is, e.g., a package for libgpiod."
34+
fi
35+
fi
36+
fi
37+
echo " Instead of this Debian+derivative-tailored configuration please invoke the compilation directly."
38+
exit 1
39+
fi
40+
fi
41+
1542
usage () {
1643
P=${0##*/}
1744
cat 1>&2 <<EOF

0 commit comments

Comments
 (0)