/usr/share/doc/libhugs-alut-bundled/examples/ALUT/TestSuite/TestVersion.hs is in libhugs-alut-bundled 98.200609.21-5.4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | {-
TestVersion.hs (adapted from test_version.c in freealut)
Copyright (c) Sven Panne 2005 <sven.panne@aedion.de>
This file is part of the ALUT package & distributed under a BSD-style license
See the file libraries/ALUT/LICENSE
-}
import Control.Monad ( unless )
import Sound.ALUT
import System.Exit ( exitFailure )
import System.IO ( hPutStrLn, stderr )
-- This program checks that the version of OpenAL in the library agrees with the
-- header file we're compiled against.
main :: IO ()
main =
withProgNameAndArgs runALUT $ \_progName _args -> do
av <- get alutVersion
unless (av == alutAPIVersion) $ do
hPutStrLn stderr ("WARNING: The ALUT library is version " ++ av ++ ".x but the ALUT binding says it's " ++ alutAPIVersion ++ ".x!")
exitFailure
hPutStrLn stderr ("The ALUT library is at version " ++ av ++ ".x")
|