augeas-0.6.1/0000775000175000017500000000000011734600616011431 5ustar judejudeaugeas-0.6.1/HUnitAug.hs0000644000175000017500000010266711734600616013463 0ustar judejude-- file: HUnitAug.hs -- Haskell bindings for the Augeas library -- Copyright (c) 2009-2012, Jude Nagurney -- This library is free software; you can redistribute it and/or modify it -- under the terms of the GNU Lesser General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This library is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -- License for more details. -- You should have received a copy of the GNU Lesser General Public License -- along with this library; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- Contact the author at -- jude@pwan.org {-# LANGUAGE CPP #-} #ifndef _config_h #include "Config.h" #define _config_h #endif module Main where import Foreign import Test.HUnit import System.Augeas import Data.ByteString.Char8 import System.Directory import Data.List (isInfixOf) import System.IO as IO -- constants bs_BadPath :: ByteString bs_BadPath = (Data.ByteString.Char8.pack "/files/bad/path") -- testBadRoot :: Test -- testBadRoot = TestCase (do -- aug_ptr <- aug_init (Data.ByteString.Char8.pack "./bad_testroot") empty [] -- assertEqual "Should get Nothing after a bad root" Nothing aug_ptr) with_augptr :: (Ptr Augeas -> IO ()) -> IO () with_augptr func = do cwd <- getCurrentDirectory maybe_aug_ptr <- aug_init (Data.ByteString.Char8.pack (cwd++"/testroot")) empty [save_newfile, enable_span] case maybe_aug_ptr of Nothing -> assertFailure "aug_ptr shouldn't be nothing in with_augptr" Just aug_fp -> (withForeignPtr aug_fp $ \aug_ptr -> func aug_ptr) testFirst :: Test testFirst = TestCase ( assertEqual "keep the test list from complaining about a leading comma" True True ) -- ---------------- -- aug_defvar tests -- ---------------- #ifdef HAS_AUGEAS_DEFVAR testBadDefVar :: Test testBadDefVar = TestCase ( with_augptr $ \aug_ptr -> do ret_defvar <- aug_defvar aug_ptr (Data.ByteString.Char8.pack "var") (Just (Data.ByteString.Char8.pack "$undefined")) assertEqual "testBadDefVar " System.Augeas.error ret_defvar ret_error <- aug_error aug_ptr assertEqual "testBadDefVar error" err_bad_path ret_error ) testGoodDefVar :: Test testGoodDefVar = TestCase ( with_augptr $ \aug_ptr -> do ret_defvar <- aug_defvar aug_ptr (Data.ByteString.Char8.pack "var") (Just (Data.ByteString.Char8.pack "/files/etc/hosts")) assertEqual "testGoodDefVar (1)" one ret_defvar ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "$var/1/canonical") assertEqual "testGoodDefVar: Should have gotten localhost" (Right (Just "localhost")) ret_get ) testReplaceDefVar :: Test testReplaceDefVar = TestCase ( with_augptr $ \aug_ptr -> do ret_defvar <- aug_defvar aug_ptr (Data.ByteString.Char8.pack "var") (Just (Data.ByteString.Char8.pack "/files/etc/hosts/1/canonical")) assertEqual "testReplaceDefVar" one ret_defvar ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "$var") assertEqual "testReplaceDefVar: Should have gotten localhost" (Right (Just "localhost")) ret_get ret_defvar2 <- aug_defvar aug_ptr (Data.ByteString.Char8.pack "var") (Just (Data.ByteString.Char8.pack "/files/etc/hosts/1/ipaddr")) assertEqual "testReplaceDefVar (2)" one ret_defvar2 ret_get2 <- aug_get aug_ptr (Data.ByteString.Char8.pack "$var") assertEqual "testReplaceDefVar: Should have gotten 127.0.0.1" (Right (Just "127.0.0.1")) ret_get2 ) testNullValueDefVar ::Test testNullValueDefVar = TestCase ( with_augptr $ \aug_ptr -> do ret_defvar <- aug_defvar aug_ptr (Data.ByteString.Char8.pack "var") (Just (Data.ByteString.Char8.pack "/files/etc/hosts/1/canonical")) assertEqual "testNullDefVar (1)" one ret_defvar ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "$var") assertEqual "testNullDefVar: Should have gotten localhost (1)" (Right (Just "localhost")) ret_get ret_defvar2 <- aug_defvar aug_ptr (Data.ByteString.Char8.pack "var") Nothing assertEqual "testNullDefVar (2)" success ret_defvar2 ret_get2 <- aug_get aug_ptr (Data.ByteString.Char8.pack "$var") assertEqual "testNullDefVar: Should have gotten localhost (2)" (Left invalid_match) ret_get2 ) testNonZeroDefVar :: Test testNonZeroDefVar = TestCase ( with_augptr $ \aug_ptr -> do ret_defvar <- aug_defvar aug_ptr (Data.ByteString.Char8.pack "var") (Just (Data.ByteString.Char8.pack "/files/etc/hosts/*")) assertEqual "testGoodDefVar (1)" (AugRet 12) ret_defvar ) #endif -- ----------------- -- aug_defnode tests -- ----------------- #ifdef HAS_AUGEAS_DEFNODE testBadDefNode :: Test testBadDefNode = TestCase ( with_augptr $ \aug_ptr -> do ret_defnode <- aug_defnode aug_ptr (Data.ByteString.Char8.pack "var") (Data.ByteString.Char8.pack "$undefined") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "testBadDefNode" (System.Augeas.error, Nothing) ret_defnode ret_error <- aug_error aug_ptr assertEqual "testBadDefNode error" err_bad_path ret_error ) testDefNode :: Test testDefNode = TestCase ( with_augptr $ \aug_ptr -> do ret_defvar <- aug_defnode aug_ptr (Data.ByteString.Char8.pack "var") (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "defnode (1)" ((AugRet 1),(Just True)) ret_defvar ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "$var") assertEqual "defnode (2)" (Right (Just "haskell-augeas.org")) ret_get -- The node already exists, so it should not be set to the new value ret_defvar2 <- aug_defnode aug_ptr (Data.ByteString.Char8.pack "bar") (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas2.org") assertEqual "defnode (3)" ((AugRet 1),(Just False)) ret_defvar2 ret_get2 <- aug_get aug_ptr (Data.ByteString.Char8.pack "$bar") assertEqual "defnode(4)" (Right (Just "haskell-augeas.org")) ret_get2 ) --testNonZeroDefNode :: Test --testNonZeroDefNode = TestCase ( with_augptr $ \aug_ptr -> do -- ret_defnode <- aug_defnode aug_ptr (Data.ByteString.Char8.pack "var") (Data.ByteString.Char8.pack "/files/etc/hosts") (Data.ByteString.Char8.pack "unset") -- assertEqual "testNonZeroDefVar (1)" ((AugRet 12),(Just False)) ret_defnode -- ) #endif -- ------------- -- aug_get tests -- ------------- #ifdef HAS_AUGEAS_GET testGetBadPath :: Test testGetBadPath = TestCase ( with_augptr $ \aug_ptr -> do ret_get <- aug_get aug_ptr bs_BadPath assertEqual "Bad path in get" (Left no_match) ret_get ) testGetPartialPath :: Test testGetPartialPath = TestCase ( with_augptr $ \aug_ptr -> do ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts") assertEqual "Partial path returns none" (Right Nothing) ret_get ) testGetStillPartialPath :: Test testGetStillPartialPath = TestCase ( with_augptr $ \aug_ptr -> do ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1") assertEqual "Partial path returns none" (Right Nothing) ret_get ) testGetBadLabel :: Test testGetBadLabel = TestCase ( with_augptr $ \aug_ptr -> do ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1/invalid") assertEqual "Bad label in get" (Left no_match) ret_get ) testGetGoodLabel :: Test testGetGoodLabel = TestCase ( with_augptr $ \aug_ptr -> do ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1/canonical") assertEqual "Should have gotten localhost" (Right (Just "localhost")) ret_get ) testGetMultipleLabel :: Test testGetMultipleLabel = TestCase ( with_augptr $ \aug_ptr -> do ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/*/canonical") assertEqual "Get should return a negative on multiple matches" (Left invalid_match) ret_get ) testGetBadMultipleLabel :: Test testGetBadMultipleLabel = TestCase ( with_augptr $ \aug_ptr -> do ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/*/invalid") assertEqual "Get should return a negative on multiple matches (2)" (Left no_match) ret_get ) #endif -- ------------- -- aug_set tests -- ------------- #ifdef HAS_AUGEAS_SET testSetLabel :: Test testSetLabel = TestCase ( with_augptr $ \aug_ptr -> do ret_set <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "set OK" success ret_set ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") assertEqual "set OK" (Right (Just "haskell-augeas.org")) ret_get ) testSetMultiMatch :: Test testSetMultiMatch = TestCase ( with_augptr $ \aug_ptr -> do ret_set <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/*/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "set OK" System.Augeas.error ret_set ret_error <- aug_error aug_ptr -- assertEqual "testSetMultiMatch error" no_error ret_error assertEqual "testSetMultiMatch error" err_multi_matches ret_error ) #endif -- -------------- -- aug_setm tests -- -------------- #ifdef HAS_AUGEAS_SETM testBadBaseSetm :: Test testBadBaseSetm = TestCase ( with_augptr $ \aug_ptr -> do ret_setm <- aug_setm aug_ptr (Data.ByteString.Char8.pack "badbase") (Just (Data.ByteString.Char8.pack "sub")) (Data.ByteString.Char8.pack "value") assertEqual "testBadBaseSetm (1)" (AugRet 0) ret_setm ) testBadPathSetm :: Test testBadPathSetm = TestCase ( with_augptr $ \aug_ptr -> do ret_setm <- aug_setm aug_ptr (Data.ByteString.Char8.pack "/") (Just (Data.ByteString.Char8.pack "/blah/*/blah/**")) (Data.ByteString.Char8.pack "value") assertEqual "testBadPathSetm (1)" (AugRet (-1)) ret_setm ) testSetm :: Test testSetm = TestCase ( with_augptr $ \aug_ptr -> do ret_set <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "set OK" success ret_set ret_setm <- aug_setm aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Just (Data.ByteString.Char8.pack "sub/1")) (Data.ByteString.Char8.pack "value") assertEqual "testSetm (1)" (AugRet 1) ret_setm ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical/sub/1") assertEqual "set OK" (Right (Just "value")) ret_get ret_setm2 <- aug_setm aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical/sub/1") Nothing (Data.ByteString.Char8.pack "value2") assertEqual "testSetm (2)" (AugRet 1) ret_setm2 ret_get2 <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical/sub/1") assertEqual "set OK" (Right (Just "value2")) ret_get2 ret_setm3 <- aug_setm aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Just (Data.ByteString.Char8.pack "sub/2")) (Data.ByteString.Char8.pack "value3") assertEqual "testSetm (3)" (AugRet 1) ret_setm3 ret_get3 <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical/sub/2") assertEqual "set OK" (Right (Just "value3")) ret_get3 ret_setm4 <- aug_setm aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical/sub/*") Nothing (Data.ByteString.Char8.pack "value4") assertEqual "testSetm (4)" (AugRet 2) ret_setm4 ret_get4 <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical/sub/1") assertEqual "set OK" (Right (Just "value4")) ret_get4 ret_get5 <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical/sub/2") assertEqual "set OK" (Right (Just "value4")) ret_get5 ) #endif -- -------------- -- aug_span tests -- -------------- #ifdef HAS_AUGEAS_SPAN testSpanNoFile :: Test testSpanNoFile = TestCase (with_augptr $ \aug_ptr -> do ret_span <- aug_span aug_ptr (Data.ByteString.Char8.pack "/files/etc/missing") assertEqual "Missing file span test" Nothing ret_span ) testSpan :: Test testSpan = TestCase (with_augptr $ \aug_ptr -> do cwd <- getCurrentDirectory ret_span <- aug_span aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts") assertEqual "Normal span test" (Just (cwd ++ "/testroot/etc/hosts", 0, 0, 0, 0, 0, 290)) ret_span ) #endif -- ---------------- -- aug_insert tests -- ---------------- #ifdef HAS_AUGEAS_INSERT testInsertBadPath :: Test testInsertBadPath = TestCase ( with_augptr $ \aug_ptr -> do ret_insert <- aug_insert aug_ptr bs_BadPath (Data.ByteString.Char8.pack "label") just_after assertEqual "Bad path in insert" System.Augeas.error ret_insert ret_error <- aug_error aug_ptr assertEqual "testInsertBadPath error" err_no_match ret_error ) testInsertMultiMatch :: Test testInsertMultiMatch = TestCase ( with_augptr $ \aug_ptr -> do ret_insert <- aug_insert aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/*/canonical") (Data.ByteString.Char8.pack "label") just_after assertEqual "No multimatches on insert" System.Augeas.error ret_insert ret_error <- aug_error aug_ptr assertEqual "testInsertMultiMatch error" err_multi_matches ret_error ) testInsertBeforeAfter :: Test testInsertBeforeAfter = TestCase ( with_augptr $ \aug_ptr -> do ret_set <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "set OK" success ret_set ret_insert <- aug_insert aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "after") just_after assertEqual "Insert after success" success ret_insert ret_insert2 <- aug_insert aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "before") just_before assertEqual "Insert before success" success ret_insert2 (match_count, (Just matches)) <- aug_match aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/*") assertEqual "Should be 3 matches" 3 match_count assertEqual "insert matches" ["/files/etc/hosts/1000/before","/files/etc/hosts/1000/canonical","/files/etc/hosts/1000/after"] matches ) #endif -- ------------ -- aug_rm tests -- ------------ #ifdef HAS_AUGEAS_RM testRmBadPath :: Test testRmBadPath = TestCase ( with_augptr $ \aug_ptr -> do ret_rm <- aug_rm aug_ptr bs_BadPath assertEqual "Bad path in rm 1" 0 ret_rm ) testRmOne :: Test testRmOne = TestCase ( with_augptr $ \aug_ptr -> do ret_set <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "set OK" success ret_set ret_rm <- aug_rm aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") assertEqual "rm 1" 1 ret_rm ) testRmTwo :: Test testRmTwo = TestCase ( with_augptr $ \aug_ptr -> do ret_set <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "set success" success ret_set ret_insert <- aug_insert aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "after") just_after assertEqual "insert success" success ret_insert ret_rm <- aug_rm aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/*") assertEqual "rm 2" 2 ret_rm ) #endif -- ------------ -- aug_mv tests -- ------------ #ifdef HAS_AUGEAS_MV testMvBadSrc :: Test testMvBadSrc = TestCase ( with_augptr $ \aug_ptr -> do ret_mv <- aug_mv aug_ptr bs_BadPath (Data.ByteString.Char8.pack "/files/etc/hosts/1/badpath") assertEqual "mv bad src" System.Augeas.error ret_mv ret_error <- aug_error aug_ptr assertEqual "testMvBadSrc error" err_no_match ret_error ) testMvNewDest :: Test testMvNewDest = TestCase ( with_augptr $ \aug_ptr -> do ret_set <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "set OK" success ret_set ret_mv <- aug_mv aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "/files/etc/hosts/1001/canonical") assertEqual "mv 1000-> 1001 OK" success ret_mv ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1001/canonical") assertEqual "get 1001 OK" (Right (Just "haskell-augeas.org")) ret_get ret_get2 <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") assertEqual "get 1000 OK" (Left no_match) ret_get2 ) #endif -- --------------- -- aug_match tests -- --------------- #ifdef HAS_AUGEAS_MATCH testMatchBadSrc :: Test testMatchBadSrc = TestCase ( with_augptr $ \aug_ptr -> do (match_count, matches) <- aug_match aug_ptr bs_BadPath assertEqual "match count bad src" 0 match_count assertEqual "matches bad src" (Just []) matches ) testMatchOne :: Test testMatchOne = TestCase ( with_augptr $ \aug_ptr -> do (match_count, matches) <- aug_match aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1/canonical") assertEqual "match count good label" 1 match_count assertEqual "match good label" (Just ["/files/etc/hosts/1/canonical"]) matches ) testMatchMultiple :: Test testMatchMultiple = TestCase ( with_augptr $ \aug_ptr -> do (match_count, matches) <- aug_match aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/*/canonical") assertEqual "match count good label" 9 match_count case matches of (Just ms) -> assertEqual "match len equals match_count" (Prelude.length(ms)) match_count Nothing -> fail "matches should not bbe Nothing" ) -- TODO: Test that forces -1 return value from aug_match #endif -- -------- -- aug_save -- -------- #ifdef HAS_AUGEAS_SAVE testSave :: Test testSave = TestCase ( with_augptr $ \aug_ptr -> do ret_save <- aug_save aug_ptr assertEqual "save good" success ret_save ) testSaveNewLabel :: Test testSaveNewLabel = TestCase ( with_augptr $ \aug_ptr -> do ret_set <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/ipaddr") (Data.ByteString.Char8.pack "192.168.1.234") assertEqual "set OK" success ret_set ret_set2 <- aug_set aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000/canonical") (Data.ByteString.Char8.pack "haskell-augeas.org") assertEqual "set OK" success ret_set2 ret_save <- aug_save aug_ptr assertEqual "save good" success ret_save cwd <- getCurrentDirectory contents <- Prelude.readFile (cwd++"/testroot/etc/hosts.augnew") assertEqual "Check augnew" (Data.List.isInfixOf "192.168.1.234\thaskell-augeas.org" contents) True removeFile (cwd++"/testroot/etc/hosts.augnew") ret_rm <- aug_rm aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1000") assertEqual "Bad path in rm 2" 3 ret_rm ret_save2 <- aug_save aug_ptr assertEqual "save good" success ret_save2 -- removing the /file/etc/hosts/10 entry will put /etc/hosts back to its original state, so nothing will be written out -- so the augnew file shouldn't exist b_AugnewExists <- doesFileExist (cwd++"/testroot/etc/hosts.augnew") assertEqual "No augnew" b_AugnewExists False ) #endif -- -------------- -- aug_load tests -- -------------- #ifdef HAS_AUGEAS_LOAD testLoad :: Test testLoad = TestCase ( with_augptr $ \aug_ptr -> do cwd <- getCurrentDirectory renameFile (cwd++"/testroot/etc/hosts") (cwd++"/testroot/etc/hosts.orig") renameFile (cwd++"/testroot/etc/hosts.reload") (cwd++"/testroot/etc/hosts") contents <- Prelude.readFile (cwd++"/testroot/etc/hosts") assertEqual "tesstLoad(1)" (Data.List.isInfixOf "192.168.0.203 testload.haskell-augeas.org" contents) True -- Force all of contents to be read, so readFile will really close the file Prelude.length contents `seq` Prelude.appendFile (cwd++"/testroot/etc/hosts") "\n$ force mtime update" ret_load <- aug_load aug_ptr assertEqual "testLoad (2)" success ret_load ret_get <- aug_get aug_ptr (Data.ByteString.Char8.pack "/augeas/error") assertEqual "testLoad (3)" (Left no_match) ret_get ret_get11 <- aug_get aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/4/ipaddr") assertEqual "testLoad (4)" (Right (Just "192.168.0.203")) ret_get11 Prelude.writeFile (cwd++"/testroot/etc/hosts") contents renameFile (cwd++"/testroot/etc/hosts") (cwd++"/testroot/etc/hosts.reload") renameFile (cwd++"/testroot/etc/hosts.orig") (cwd++"/testroot/etc/hosts") ) #endif -- --------------- -- aug_print tests -- --------------- #ifdef HAS_AUGEAS_PRINT testPrint :: Test testPrint = TestCase ( with_augptr $ \aug_ptr -> do cwd <- getCurrentDirectory fptr_Output <- openFile (cwd++"/HUnitAug.txt") WriteMode ret_print <- aug_print aug_ptr fptr_Output (Data.ByteString.Char8.pack "/files/etc/hosts") assertEqual "testPrint ret_print" success ret_print IO.hPutStr fptr_Output "That's all folks" hFlush fptr_Output hClose fptr_Output contents <- IO.readFile (cwd++"/HUnitAug.txt") assertEqual ("check aug_print") (Data.List.isInfixOf "/files/etc/hosts\n" contents) True assertEqual ("check after aug_print") (Data.List.isInfixOf "That's all folks" contents) True removeFile (cwd++"/HUnitAug.txt") ) #endif -- -------------- -- aug_srun tests -- -------------- #ifdef HAS_AUGEAS_SRUN testSrunHelp :: Test testSrunHelp = TestCase ( with_augptr $ \aug_ptr -> do cwd <- getCurrentDirectory fptr_Output <- openFile (cwd++"/HUnitAug.txt") WriteMode ret_srun <- aug_srun aug_ptr fptr_Output (Data.ByteString.Char8.pack "help\n") assertEqual "testSrun ret_srun" (AugRet 1) ret_srun hFlush fptr_Output hClose fptr_Output contents <- IO.readFile (cwd++"/HUnitAug.txt") assertEqual "check aug_srun_help" (Data.List.isInfixOf "Commands:" contents) True assertEqual "check aug_srun_help" (Data.List.isInfixOf "Type 'help ' for more information on a command" contents) True removeFile (cwd++"/HUnitAug.txt") ) testSrunQuit :: Test testSrunQuit = TestCase ( with_augptr $ \aug_ptr -> do cwd <- getCurrentDirectory fptr_Output <- openFile (cwd++"/HUnitAug.txt") WriteMode ret_srun <- aug_srun aug_ptr fptr_Output (Data.ByteString.Char8.pack "quit\n") assertEqual "testSrun ret_srun_quit" (AugRet (-2)) ret_srun hFlush fptr_Output hClose fptr_Output contents <- IO.readFile (cwd++"/HUnitAug.txt") assertEqual "check aug_srun_quit_contents" (contents == "") True -- removeFile (cwd++"/HUnitAug.txt") ) #endif -- --------------- -- aug_error tests -- --------------- #ifndef HAS_AUGEAS_ERROR testError :: Test testError = TestCase ( with_augptr $ \aug_ptr -> do ret_err <- aug_error aug_ptr assertEqual ("testError") no_error ret_err ) #endif -- ---------------- -- aug_error* tests -- ---------------- #ifdef HAS_AUGEAS_ERROR_MESSAGE testErrMessage :: Test testErrMessage = TestCase ( with_augptr $ \aug_ptr -> do ret_defvar <- aug_defvar aug_ptr (Data.ByteString.Char8.pack "var") (Just (Data.ByteString.Char8.pack "$undefined")) assertEqual "testErrMessage (1)" System.Augeas.error ret_defvar ret_error <- aug_error aug_ptr assertEqual "testErrMessage (2)" err_bad_path ret_error err_message <- aug_error_message aug_ptr assertEqual "testErrMessage (3)" (Data.ByteString.Char8.pack "Invalid path expression") err_message #ifdef HAS_AUGEAS_ERROR_MINOR_MESSAGE err_minor_message <- aug_error_minor_message aug_ptr assertEqual "testErrMessage (4)" (Data.ByteString.Char8.pack "undefined variable") err_minor_message #endif #ifdef HAS_AUGEAS_ERROR_DETAILS err_details <- aug_error_details aug_ptr assertEqual "testErrMessage (4)" (Data.ByteString.Char8.pack "$undefined|=|") err_details #endif ) #endif -- ---------------- -- aug_to_xml tests -- ---------------- #ifdef HAS_AUGEAS_TO_XML testToXml :: Test testToXml = TestCase ( with_augptr $ \aug_ptr -> do -- test success (ret==0, AugeasXmlNode != NULL) ret_toxml <- aug_to_xml aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1/canonical") [none] assertEqual "testGoodToXml" success (fst ret_toxml) assertBool "testGoodToXmlJustPtr" ((snd ret_toxml) /= Nothing) ret_toxml2 <- aug_to_xml aug_ptr (Data.ByteString.Char8.pack "/files/etc/hosts/1/canonical") [save_backup] assertEqual "testFlagsNotZero" System.Augeas.error (fst ret_toxml2) err_message <- aug_error_message aug_ptr assertEqual "testFlagsNotZeroErr" (Data.ByteString.Char8.pack "Invalid argument in function call") err_message err_details <- aug_error_details aug_ptr assertEqual "testFlagsNotZeroErrDetails" (Data.ByteString.Char8.pack "aug_to_xml: FLAGS must be 0") err_details assertEqual "testFlagsNotZeroNode" Nothing (snd ret_toxml2) ) #endif main :: IO Counts main = runTestTT $ TestList [ -- testBadRoot, testFirst #ifdef HAS_AUGEAS_DEFVAR ,testBadDefVar ,testGoodDefVar ,testReplaceDefVar ,testNullValueDefVar ,testNonZeroDefVar #endif #ifdef HAS_AUGEAS_DEFNODE ,testBadDefNode ,testDefNode -- ,testNonZeroDefNode #endif #ifdef HAS_AUGEAS_GET ,testGetBadPath ,testGetPartialPath ,testGetStillPartialPath ,testGetBadLabel ,testGetGoodLabel ,testGetMultipleLabel ,testGetBadMultipleLabel #endif #ifdef HAS_AUGEAS_SET ,testSetLabel ,testSetMultiMatch #endif #ifdef HAS_AUGEAS_SETM ,testBadBaseSetm ,testBadPathSetm ,testSetm #endif #ifdef HAS_AUGEAS_SPAN ,testSpanNoFile ,testSpan #endif #ifdef HAS_AUGEAS_INSERT ,testInsertBadPath ,testInsertMultiMatch ,testInsertBeforeAfter #endif #ifdef HAS_AUGEAS_RM ,testRmBadPath ,testRmOne ,testRmTwo #endif #ifdef HAS_AUGEAS_MV ,testMvBadSrc ,testMvNewDest #endif #ifdef HAS_AUGEAS_MATCH ,testMatchBadSrc ,testMatchOne ,testMatchMultiple #endif #ifdef HAS_AUGEAS_SAVE ,testSave ,testSaveNewLabel #endif #ifdef HAS_AUGEAS_LOAD ,testLoad #endif #ifdef HAS_AUGEAS_PRINT ,testPrint #endif #ifdef HAS_AUGEAS_SRUN ,testSrunHelp ,testSrunQuit #endif #ifndef HAS_AUGEAS_ERROR ,testError #endif #ifdef HAS_AUGEAS_ERROR_MESSAGE ,testErrMessage #endif #ifdef HAS_AUGEAS_TO_XML ,testToXml #endif -- aug_close already handled in ForeignPtr, so there's no need to surface it to Haskell users at all. ]augeas-0.6.1/augeas.cabal0000644000175000017500000000243011734600616013657 0ustar judejudeName: augeas Version: 0.6.1 Synopsis: A Haskell FFI wrapper for the Augeas API Description: A Haskell FFI wrapper for the Augeas API Author: Jude Nagurney Maintainer: jude@pwan.org Cabal-Version: >= 1.6 License: LGPL License-File: LICENSE Data-Files: AUTHORS, README, THANKS, ChangeLog, testroot/etc/hosts, testroot/etc/hosts.reload Build-Type: Configure Category: System Stability: Alpha HomePage: http://trac.haskell.org/augeas Package-URL: http://hackage.haskell.org/packages/archive/augeas/0.6.0/augeas-0.6.0.tar.gz Extra-Source-Files: Makefile, configure.ac, configure, Config.h.in Source-Repository head Type: darcs Location: http://code.haskell.org:/augeas library Exposed-Modules: System.Augeas Other-Modules: System.AugeasHsc Build-Depends: base >= 4.0 && <5, directory, unix >=2.3.0.0, bytestring >= 0.9.0.1 GHC-options: -Wall -fwarn-dodgy-imports Include-Dirs: . Extensions: CPP Pkgconfig-Depends: augeas executable "test-haskell-augeas" Main-is: HUnitAug.hs Build-Depends: HUnit Include-Dirs: . Other-Modules: System.Augeas, System.AugeasHsc extra-libraries: augeas GHC-options: -Wall -fwarn-dodgy-imports Extensions: CPP Pkgconfig-Depends: augeas augeas-0.6.1/README0000644000175000017500000000020411734600616012303 0ustar judejudeEnjoy your Haskell bindings for Augeas. To build the library: > chmod a+x ./configure > ./configure > make test > sudo make installaugeas-0.6.1/System/0000775000175000017500000000000011734600616012715 5ustar judejudeaugeas-0.6.1/System/Augeas.hs0000644000175000017500000010324011734600616014454 0ustar judejude-- file: System/Augeas.hs -- Haskell bindings for the Augeas library -- Copyright (c) 2009-2012, Jude Nagurney -- This library is free software; you can redistribute it and/or modify it -- under the terms of the GNU Lesser General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This library is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -- License for more details. -- You should have received a copy of the GNU Lesser General Public License -- along with this library; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- Contact the author at -- jude@pwan.org {-# LANGUAGE CPP, ForeignFunctionInterface #-} #ifndef _config_h #include "../Config.h" #define _config_h #endif {-| This module provides FFI bindings for the Augeas API (). /Note aug_close is not surfaced in the API because because the ForeignPtr returned by/ /aug_init uses aug_close as its finializer./ -} module System.Augeas ( -- * Types Augeas , AugFlag(..) , none, save_backup, save_newfile, type_check, no_stdinc, save_noop, no_load, no_modl_autoload #ifdef HAS_AUGEAS_SPAN , enable_span #endif , AugMatch , exactly_one, no_match, invalid_match , AugRet(..) , success, one, System.Augeas.error , AugBefore(..) , just_before, just_after , AugErrCode(..) , no_error, err_no_memory, err_internal, err_bad_path, err_no_match, err_multi_matches, err_syntax, err_no_lens, err_multi_xfm #ifdef HAS_AUGEAS_SPAN , err_no_span #endif #ifdef HAS_AUGEAS_SRUN , err_mv_desc , err_cmd_run #endif -- * Functions , aug_init , aug_defvar , aug_defnode , aug_get , aug_set , aug_setm , aug_span , aug_insert , aug_rm , aug_mv , aug_match , aug_save , aug_load , aug_print , aug_srun , aug_error , aug_error_message , aug_error_minor_message , aug_error_details #ifdef HAS_AUGEAS_TO_XML , aug_to_xml #endif ) where import System.IO import System.Posix.IO import System.Posix.Types import Foreign import Foreign.C.Types import Foreign.C.String import GHC.IO.Handle import Data.ByteString.Char8 import System.AugeasHsc -- -------------- -- Augeas pointer -- -------------- {-| A pointer to the Augeas tree structure Not using a typed pointer (as per RWH p416) because of the compiler warning -} --newtype Augeas = Augeas (Ptr Augeas) -- deriving (Eq, Show) type Augeas = () -- --------- -- aug_match -- --------- {-| The possible 'aug_get' return values. -} newtype AugMatch = AugMatch CInt deriving (Eq, Show) {-| Exactly one match was found. -} exactly_one :: AugMatch exactly_one = AugMatch 1 {-| No matches were found -} no_match :: AugMatch no_match = AugMatch 0 {-| Either an invalid paths, or multiple matches were found. -} invalid_match :: AugMatch invalid_match = AugMatch (-1) -- ------- -- aug_ret -- ------- {-| The possible return values for the 'aug_set', 'aug_insert', 'aug_mv', 'aug_save', and 'aug_print' functions -} newtype AugRet = AugRet CInt deriving (Eq, Show) {-| The function worked as expected -} success :: AugRet success = AugRet 0 {-| The function failed -} error :: AugRet error = AugRet (-1) one :: AugRet one = AugRet 1 -- ---------- -- aug_before -- ---------- {-| The possible BEFORE values fro the aug_insert function -} newtype AugBefore = AugBefore CInt deriving (Eq, Show) {-| Insert the LABEL just before the PATH -} just_before :: AugBefore just_before = AugBefore 1 {-| Insert the LABEL just after the PATH -} just_after :: AugBefore just_after = AugBefore 0 -- utility functions combineFlags :: [AugFlag] -> AugFlag combineFlags = AugFlag . Prelude.foldr ((.|.) . unAugFlag) 0 -- -------- -- aug_init -- -------- -- TODO: Replace loadpath string with a dedicated loadpath type ? foreign import ccall safe "augeas.h aug_init" c_aug_init :: CString -> CString -> AugFlag -> IO (Ptr Augeas) {-| Initialize the library. Use ROOT as the filesystem root. If ROOT is NULL, use the value of the environment variable AUGEAS_ROOT. If that doesn't exist either, use \"\/\". LOADPATH is a colon-spearated list of directories that modules should be searched in. This is in addition to the standard load path and the directories in AUGEAS_LENS_LIB FLAGS is a list of AugFlags Return a ForeignPtr to the Augeas tree upon success. If initialization fails, returns Nothing. /Note that the ForeignPtr returned by the function is using aug_close as a finializer,/ /so aug_close is called automatically when the Augeas pointer goes out of scope./ /Therefore, there is no need to surface aug_close in the library./ -} aug_init :: ByteString -- ^ ROOT -> ByteString -- ^ LOADPATH -> [AugFlag] -- ^ FLAGS -> IO (Maybe (ForeignPtr Augeas)) -- ^ Augeas pointer aug_init bstr1 bstr2 flags = useAsCString bstr1 $ \root -> do useAsCString bstr2 $ \loadpath -> do aug_ptr <- c_aug_init root loadpath (combineFlags flags) if (aug_ptr == nullPtr) then do return Nothing else do ret_ptr <- newForeignPtr c_aug_close aug_ptr -- release with aug_close return (Just ret_ptr) -- --------- -- aug_close -- --------- foreign import ccall safe "augeas.h &aug_close" c_aug_close :: FinalizerPtr Augeas --{-| -- from augeas.h: -- Close this Augeas instance and free any storage associated with -- it. After running AUG_CLOSE, AUG is invalid and can not be used for any -- more operations. ---} --aug_close :: FinalizerPtr Augeas --aug_close = c_aug_close -- ---------- -- aug_defvar -- ---------- #ifdef HAS_AUGEAS_DEFVAR foreign import ccall safe "augeas.h aug_defvar" c_aug_defvar :: Ptr Augeas -- aug -> CString -- name -> CString -- expr -> IO (AugRet) -- return_value #endif {-| Function: aug_defvar Define a variable NAME whose value is the result of evaluating EXPR. If a variable NAME already exists, its name will be replaced with the result of evaluating EXPR. Context will not be applied to EXPR. If (Maybe EXPR) is Nothing, the variable NAME will be removed if it is defined. Path variables can be used in path expressions later on by prefixing them with '$'. Returns -1 on error; on success, returns 0 if EXPR evaluates to anything other than a nodeset, and the number of nodes if EXPR evaluates to a nodeset -} aug_defvar :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ NAME -> (Maybe ByteString) -- ^ Maybe EXPR -> IO (AugRet) -- ^ AugRet aug_defvar aug_ptr bstr1 maybe_bstr2 = #ifndef HAS_AUGEAS_DEFVAR Prelude.error "aug_defvar requires at least augeas version 0.5.0" Prelude.error ((show aug_ptr) ++ (show bstr1) ++ (show maybe_bstr2)) -- stop compiler warning #else useAsCString bstr1 $ \name -> do ret <- (case maybe_bstr2 of (Just bstr2) -> useAsCString bstr2 $ \expr -> do c_aug_defvar aug_ptr name expr (Nothing) -> c_aug_defvar aug_ptr name nullPtr) return ret #endif -- ----------- -- aug_defnode -- ----------- #ifdef HAS_AUGEAS_DEFNODE foreign import ccall safe "augeas.h aug_defnode" c_aug_defnode :: Ptr Augeas -- aug -> CString -- name -> CString -- expr -> CString -- value -> Ptr CInt -- created -> IO (CInt) -- return_value #endif {-| Function: aug_defnode Define a variable NAME whose value is the result of evaluating EXPR, which must be non-NULL and evaluate to a nodeset. If a variable NAME already exists, its name will be replaced with the result of evaluating EXPR. If EXPR evaluates to an empty nodeset, a node is created, equivalent to calling AUG_SET(AUG, EXPR, VALUE) and NAME will be the nodeset containing that single node. If CREATED is non-NULL, it is set to 1 if a node was created, and 0 if it already existed. Returns -1 on error; on success, returns the number of nodes in the nodeset -} aug_defnode :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ NAME -> ByteString -- ^ EXPR -> ByteString -- ^ VALUE -> IO (AugRet,Maybe Bool) -- ^ (AugMatch,b_NodeCreated) aug_defnode aug_ptr bstr1 bstr2 bstr3 = #ifndef HAS_AUGEAS_DEFNODE Prelude.error "aug_defnode requires at least augeas version 0.5.0" Prelude.error ((show aug_ptr) ++ (show bstr1) ++ (show bstr2) ++ (show bstr3)) -- stop compiler warning #else useAsCString bstr1 $ \name -> do useAsCString bstr2 $ \expr -> do useAsCString bstr3 $ \value -> do alloca $ \created -> do ret <- c_aug_defnode aug_ptr name expr value created if ret /= -1 then do i_created <- peek created if i_created == 0 then do return ((AugRet ret), Just False) else do return ((AugRet ret), Just True) else do return ((AugRet ret), Nothing) #endif -- ------- -- aug_get -- ------- #ifdef HAS_AUGEAS_GET foreign import ccall safe "augeas.h aug_get" c_aug_get :: Ptr Augeas -- aug -> CString -- path -> Ptr CString -- value -> IO (CInt) -- return_value #endif {-| Lookup the value associated with PATH. VALUE can be NULL, in which case it is ignored. If VALUE is not NULL, it is used to return a pointer to the value associated with PATH if PATH matches exactly one node. If PATH matches no nodes or more than one node, *VALUE is set to NULL. Note that it is perfectly legal for nodes to have a NULL value, and that that by itself does not indicate an error. Return AugMatch.exactly_one if there is exactly one node matching PATH, AugMatch.no_match if there is none, and AugMatch.invalid_match if there is more than one node matching PATH, or if PATH is not a legal path expression. -} aug_get :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ PATH -> IO (Either AugMatch (Maybe String)) -- ^ Either AugMatch or VALUE aug_get aug_ptr bstr1 = #ifndef HAS_AUGEAS_GET Prelude.error "aug_get requires at least augeas version 0.0.1" Prelude.error ((show aug_ptr) ++ (show bstr1)) -- stop compiler warning #else useAsCString bstr1 $ \path -> do alloca $ \value -> do ret <- c_aug_get aug_ptr path value if ret == 1 then do if value == nullPtr then do return (Left (AugMatch ret)) else do peeked <- peek value if peeked == nullPtr then do return (Right Nothing) else do str_peeked <- peekCString peeked return (Right (Just str_peeked)) else do return (Left (AugMatch ret)) #endif -- ------- -- aug_set -- ------- #ifdef HAS_AUGEAS_SET foreign import ccall safe "augeas.h aug_set" c_aug_set :: Ptr Augeas -- aug -> CString -- path -> CString -- value -> IO (AugRet) -- return value #endif {-| Set the value associated with PATH to VALUE. VALUE is copied into the internal data structure. Intermediate entries are created if they don't exist. Return AugRet.success on success, AugRet.error on error. It is an error if more than one node matches PATH. -} aug_set :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ PATH -> ByteString -- ^ VALUE -> IO (AugRet) -- ^ return value aug_set aug_ptr bs1 bs2 = #ifndef HAS_AUGEAS_SET Prelude.error "aug_set requires at least augeas version 0.0.1" Prelude.error ((show aug_ptr) ++ (show bs1) ++ (show bs2)) -- stop compiler warning #else useAsCString bs1 $ \path -> do useAsCString bs2 $ \value -> do ret <- c_aug_set aug_ptr path value return ret #endif -- -------- -- aug_setm -- -------- #ifdef HAS_AUGEAS_SETM foreign import ccall safe "augeas.h aug_setm" c_aug_setm :: Ptr Augeas -- aug -> CString -- base -> CString -- sub -> CString -- value -> IO (AugRet) --return value #endif {-| Set the value of multiple nodes in one operation. Find or create a node matching SUB by interpreting SUB as a path expression relative to each node matching BASE. SUB may be NULL, in which case all the nodes matching BASE will be modified. Returns: number of modified nodes on success, -1 on error -} aug_setm :: Ptr Augeas -- ^Augeas pointer -> ByteString -- base -> (Maybe ByteString) -- sub -> ByteString -- value -> IO (AugRet) -- retval aug_setm aug_ptr bstr1 maybe_bstr2 bstr3 = #ifndef HAS_AUGEAS_SETM Prelude.error "aug_setm requires at least augeas version 0.7.2" Prelude.error ((show aug_ptr) ++ (show bstr1) ++ (show maybe_bstr2) ++ (show bstr3)) -- stop compiler warning #else useAsCString bstr1 $ \base -> do useAsCString bstr3 $ \value -> do ret <- (case maybe_bstr2 of (Just bstr2) -> useAsCString bstr2 $ \sub -> do c_aug_setm aug_ptr base sub value (Nothing) -> c_aug_setm aug_ptr base nullPtr value ) return ret #endif -- -------- -- aug_span -- -------- #ifdef HAS_AUGEAS_SPAN foreign import ccall safe "augeas.h aug_span" c_aug_span :: Ptr Augeas -- aug -> CString -- path -> (Ptr CString) -- filename -> (Ptr CInt) -- label_start -> (Ptr CInt) -- label_end -> (Ptr CInt) -- value_start -> (Ptr CInt) -- value_end -> (Ptr CInt) -- span_start -> (Ptr CInt) -- span_end -> IO (CInt) -- return value #endif {-| Function: aug_span Get the span according to input file of the node associated with PATH. If the node is associated with a file, the filename, label and value start and end positions are set, and return value is 0. The caller is responsible for freeing returned filename. If an argument for return value is NULL, then the corresponding value is not set. If the node associated with PATH doesn't belong to a file or is doesn't exists, filename and span are not set and return value is Nothing. Returns: on success Just (filename, label_start, label_stop, value_start, value_end, start_span, end_span) on error Nothing -} aug_span :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ Path -> IO (Maybe (String, CInt, CInt, CInt, CInt, CInt, CInt)) aug_span aug_ptr bs1 = #ifndef HAS_AUGEAS_SPAN Prelude.error "aug_span requires at least augeas version 0.8.0" Prelude.error ((show aug_ptr) ++ (show bs1)) -- stop compiler warning #else useAsCString bs1 $ \path -> do alloca $ \filename -> do alloca $ \label_start -> do alloca $ \label_end -> do alloca $ \value_start -> do alloca $ \value_end -> do alloca $ \span_start -> do alloca $ \span_end -> do ret <- c_aug_span aug_ptr path filename label_start label_end value_start value_end span_start span_end if ret == 0 then do p_filename <- peek filename ps_filename <- peekCString p_filename p_label_start <- peek label_start p_label_end <- peek label_end p_value_start <- peek value_start p_value_end <- peek value_end p_span_start <- peek span_start p_span_end <- peek span_end -- From http://www.haskell.org/haskellwiki/FFI_Introduction -- The haskell report only guarantees that Int has 30 bits of signed precision, so converting CInt to Int is not safe! return (Just (ps_filename, p_label_start, p_label_end, p_value_start, p_value_end, p_span_start, p_span_end)) else do return Nothing #endif -- ---------- -- aug_insert -- ---------- #ifdef HAS_AUGEAS_INSERT foreign import ccall safe "augeas.h aug_insert" c_aug_insert :: Ptr Augeas -- aug -> CString -- path -> CString -- label -> AugBefore -- before -> IO (AugRet) -- return value #endif {-| Create a new sibling LABEL for PATH by inserting into the tree just before PATH if BEFORE == just_before or just after PATH if BEFORE == just_after. PATH must match exactly one existing node in the tree, and LABEL must be a label, i.e. not contain a '/', '*' or end with a bracketed index '[N]'. Return AugRet.success on success, and AugRet.error if the insertion fails. -} aug_insert :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ PATH -> ByteString -- ^ LABEL -> AugBefore -- ^ BEFORE -> IO (AugRet) -- ^ return value aug_insert aug_ptr bs1 bs2 before = #ifndef HAS_AUGEAS_INSERT Prelude.error "aug_insert requires at least augeas version 0.0.1" Prelude.error ((show aug_ptr) ++ (show bs1) ++ (show bs2) ++ (show before)) -- stop compiler warning #else useAsCString bs1 $ \path -> do useAsCString bs2 $ \label -> do ret <- c_aug_insert aug_ptr path label before return ret #endif -- ------ -- aug_rm -- ------ #ifdef HAS_AUGEAS_RM foreign import ccall safe "augeas.h aug_rm" c_aug_rm :: Ptr Augeas -- aug -> CString -- path -> IO (CInt) -- return value #endif {-| Remove path and all its children. Returns the number of entries removed. All nodes that match PATH, and their descendants, are removed. -} aug_rm :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ PATH -> IO (CInt) -- ^ number of entries removed aug_rm aug_ptr bs_path = #ifndef HAS_AUGEAS_RM Prelude.error "aug_rm requires at least augeas version 0.0.1" Prelude.error ((show aug_ptr) ++ (show bs_path)) -- stop compiler warning #else useAsCString bs_path $ \path -> do ret <- c_aug_rm aug_ptr path return ret #endif -- ------ -- aug_mv -- ------ #ifdef HAS_AUGEAS_MV foreign import ccall safe "augeas.h aug_mv" c_aug_mv :: Ptr Augeas -- aug -> CString -- src -> CString -- dst -> IO (AugRet) -- return value #endif {- | Move the node SRC to DST. SRC must match exactly one node in the tree. DST must either match exactly one node in the tree, or may not exist yet. If DST exists already, it and all its descendants are deleted. If DST does not exist yet, it and all its missing ancestors are created. Note that the node SRC always becomes the node DST: when you move \/a\/b to \/x, the node \/a\/b is now called \/x, no matter whether \/x existed initially or not. Return AugRet.success on success and AugRet.error on failure. -} aug_mv :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ SRC -> ByteString -- ^ DEST -> IO (AugRet) -- ^ return value aug_mv aug_ptr bs_src bs_dst = #ifndef HAS_AUGEAS_MV Prelude.error "aug_mv requires at least augeas version 0.3.0" Prelude.error ((show aug_ptr) ++ (show bs_src) ++ (show bs_dst)) -- stop compiler warning #else useAsCString bs_src $ \src -> do useAsCString bs_dst $ \dst -> do ret <- c_aug_mv aug_ptr src dst return ret #endif -- --------- -- aug_match -- --------- #ifdef HAS_AUGEAS_MATCH foreign import ccall safe "augeas.h aug_match" c_aug_match :: Ptr Augeas -- aug -> CString -- path -> Ptr (Ptr CString) -- matches -> IO (CInt) -- return value #endif {-| Return the number of matches of the path expression PATH in AUG. If MATCHES is non-NULL, an array with the returned number of elements will be allocated and filled with the paths of the matches. The caller must free both the array and the entries in it. The returned paths are sufficiently qualified to make sure that they match exactly one node in the current tree. If MATCHES is NULL, nothing is allocated and only the number of matches is returned. Returns -1 on error, or the total number of matches (which might be 0). Path expressions use a very simple subset of XPath: the path PATH consists of a number of segments, separated by '/'; each segment can either be a '*', matching any tree node, or a string, optionally followed by an index in brackets, matching tree nodes labelled with exactly that string. If no index is specified, the expression matches all nodes with that label; the index can be a positive number N, which matches exactly the Nth node with that label (counting from 1), or the special expression 'last()' which matches the last node with the given label. All matches are done in fixed positions in the tree, and nothing matches more than one path segment. -} aug_match :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ PATH -> IO (Int, Maybe [String]) -- ^ (match count, MATCHES) aug_match aug_ptr bs_path = #ifndef HAS_AUGEAS_MATCH Prelude.error "aug_match requires at least augeas version 0.0.1" Prelude.error ((show aug_ptr) ++ (show bs_path)) -- stop compiler warning #else useAsCString bs_path $ \path -> do alloca $ \matches -> do ret <- c_aug_match aug_ptr path matches if ret == -1 then do return (-1, Nothing) else do matches_cstrs <- peekArray (fromIntegral ret) =<< peek matches -- There's got to be a better way to map (IO [CString]) to (IO [String]) ... matches_strs <- Prelude.foldr (\t io_l -> do s <- peekCString t; l <- io_l; return (s:l)) (return []) matches_cstrs return (fromIntegral ret, Just matches_strs) #endif -- -------- -- aug_save -- -------- #ifdef HAS_AUGEAS_SAVE foreign import ccall safe "augeas.h aug_save" c_aug_save :: Ptr Augeas -- aug -> IO (AugRet) -- return value #endif {-| Write all pending changes to disk. Return AugRet.error if an error is encountered, AugRet.success on success. Only files that had any changes made to them are written. If AUG_SAVE_NEWFILE is set in the FLAGS passed to AUG_INIT, create changed files as new files with the extension ".augnew", and leave the original file unmodified. Otherwise, if AUG_SAVE_BACKUP is set in the FLAGS passed to AUG_INIT, move the original file to a new file with extension ".augsave". If neither of these flags is set, overwrite the original file. -} aug_save :: Ptr Augeas -- ^ Augeas pointer -> IO (AugRet) -- ^ return value aug_save aug_ptr = #ifndef HAS_AUGEAS_SAVE Prelude.error "aug_save requires at least augeas version 0.0.1" Prelude.error (show aug_ptr) -- stop compiler warning #else do ret <- c_aug_save aug_ptr return ret #endif -- -------- -- aug_load -- -------- #ifdef HAS_AUGEAS_LOAD foreign import ccall safe "augeas.h aug_load" c_aug_load :: Ptr Augeas -- aug -> IO (CInt) -- return value #endif {-| Function: aug_load Load files into the tree. Which files to load and what lenses to use on them is specified under /augeas/load in the tree; each entry /augeas/load/NAME specifies a 'transform', by having itself exactly one child 'lens' and any number of children labelled 'incl' and 'excl'. The value of NAME has no meaning. The 'lens' grandchild of /augeas/load specifies which lens to use, and can either be the fully qualified name of a lens 'Module.lens' or '@Module'. The latter form means that the lens from the transform marked for autoloading in MODULE should be used. The 'incl' and 'excl' grandchildren of /augeas/load indicate which files to transform. Their value are used as glob patterns. Any file that matches at least one 'incl' pattern and no 'excl' pattern is transformed. The order of 'incl' and 'excl' entries is irrelevant. When AUG_INIT is first called, it populates /augeas/load with the transforms marked for autoloading in all the modules it finds. Before loading any files, AUG_LOAD will remove everything underneath /augeas/files and /files, regardless of whether any entries have been modified or not. Returns -1 on error, 0 on success. Note that success includes the case where some files could not be loaded. Details of such files can be found as '/augeas//error'. -} aug_load :: Ptr Augeas -- ^ Augeas pointer -> IO (AugRet) -- ^ return value aug_load aug_ptr = #ifndef HAS_AUGEAS_LOAD Prelude.error "aug_load requires at least augeas version 0.5.0" Prelude.error (show aug_ptr) -- stop compiler warning #else do ret <- c_aug_load aug_ptr return (AugRet ret) #endif -- --------- -- aug_print -- --------- -- FILE *fdopen(int fildes, const char *mode); foreign import ccall "" fdopen :: Fd -> CString -> IO (Ptr CFile) foreign import ccall "" fflush :: (Ptr CFile) -> IO (Int) foreign import ccall "" fclose :: (Ptr CFile) -> IO (Int) handleToCFile :: Handle -> String -> IO (Ptr CFile) handleToCFile h m = do iomode <- newCString m -- Duplicate the handle, so the original stays open after the handleToFd call closes the duplicate dup_h <- hDuplicate h fd <- handleToFd dup_h fdopen fd iomode -- surface aug_print #ifdef HAS_AUGEAS_PRINT foreign import ccall safe "augeas.h aug_print" c_aug_print :: Ptr Augeas -- aug -> Ptr CFile -- out -> CString -- path -> IO (AugRet) -- return value #endif {-| Print each node matching PATH and its descendants to OUT. Return AugRet.success on success, or AugRet.error on failure -} aug_print :: Ptr Augeas -- ^ Augeas pointer -> Handle -- ^ Already opened file handle -> ByteString -- ^ PATH -> IO (AugRet) -- ^ return value aug_print aug_ptr fptr_out bs_path = #ifndef HAS_AUGEAS_PRINT Prelude.error "aug_print requires at least augeas version 0.0.1" Prelude.error ((show aug_ptr) ++ (show fptr_out) ++ (show bs_path)) -- stop compiler warning #else useAsCString bs_path $ \path -> do out <- handleToCFile fptr_out "w" ret <- c_aug_print aug_ptr out path _ <- fflush out _ <- fclose out return(ret) #endif -- ---------- -- aug_to_xml -- ---------- #ifdef HAS_AUGEAS_TO_XML -- TODO: What's the standard GHC interface to libxml2 ? : libxml (Text.XML.LibXML) or xml (Text.XML.Light) foreign import ccall safe "augeas.h aug_to_xml" c_aug_to_xml :: Ptr Augeas -- aug -> CString -- path -> (Ptr (Ptr AugeasXmlNode )) -- xmldoc -> AugFlag -- flags -> IO (AugRet) -- error code (0 on success, <0 on error) #endif {-| Function: aug_to_xml Turn the Augeas tree(s) matching PATH into an XML tree XMLDOC. The parameter FLAGS is currently unused and must be set to 0. Returns: 0 on success, or a negative value on failure In case of failure, *xmldoc is set to Nothing -} aug_to_xml :: Ptr Augeas -- ^ Augeas pointer -> ByteString -- ^ path -> [AugFlag] -- ^ flags -> IO (AugRet, Maybe (Ptr AugeasXmlNode)) -- ^ error code aug_to_xml aug_ptr bs_path flags = #ifndef HAS_AUGEAS_TO_XML Prelude.error "aug_to_xml requires at least augeas version 0.10.0" Prelude.error ((show aug_ptr) ++ (show bs_path) ++ (show flags)) -- stop compiler warning #else useAsCString bs_path $ \path -> do alloca $ \ptr -> do ret <- c_aug_to_xml aug_ptr path ptr (combineFlags flags) ret_xml <- peek ptr if ret_xml == nullPtr then do return (ret, Nothing) else do return (ret, (Just ret_xml)) #endif -- -------- -- aug_srun -- -------- #ifdef HAS_AUGEAS_SRUN foreign import ccall safe "augeas.h aug_srun" c_aug_srun :: Ptr Augeas -- aug -> Ptr CFile -- out -> CString -- text -> IO (AugRet) -- error code #endif {-| Function: aug_srun Run one or more newline-separated commands. The output of the commands will be printed to OUT. Running just 'help' will print what commands are available. Commands accepted by this are identical to what augtool accepts. Returns: the number of executed commands on success, -1 on failure, and -2 if a 'quit' command was encountered -} aug_srun :: Ptr Augeas -- ^ Augeas pointer -> Handle -- ^ OUT Already opened file handle -> ByteString -- ^ TEXT -> IO (AugRet) -- ^ return value aug_srun aug_ptr fptr_out bs_text = #ifndef HAS_AUGEAS_SRUN Prelude.error "aug_srun requires at least augeas version 0.9.0" Prelude.error ((show aug_ptr) ++ (show fptr_out) ++ (show bs_text)) -- stop compiler warning #else useAsCString bs_text $ \text -> do out <- handleToCFile fptr_out "w" ret <- c_aug_srun aug_ptr out text _ <- fflush out _ <- fclose out return(ret) #endif -- --------- -- aug_error -- --------- #ifdef HAS_AUGEAS_ERROR foreign import ccall safe "augeas.h aug_error" c_aug_error :: Ptr Augeas -- aug -> IO (AugErrCode) -- error code #endif {-| Return a human-readable message for the error code */ -} aug_error :: Ptr Augeas -- ^ Augeas pointer -> IO (AugErrCode) -- ^ return value aug_error aug_ptr = #ifndef HAS_AUGEAS_ERROR Prelude.error "aug_error requires at least augeas version 0.6.0" Prelude.error (show aug_ptr) -- stop compiler warning #else do ret <- c_aug_error aug_ptr return(ret) #endif -- ----------------- -- aug_error_message -- ----------------- #ifdef HAS_AUGEAS_ERROR_MESSAGE foreign import ccall safe "augeas.h aug_error_message" c_aug_error_message :: Ptr Augeas -- aug -> IO (CString) -- return value #endif {-| Return a human-readable message for the error code */ -} aug_error_message :: Ptr Augeas -- ^ Augeas pointer -> IO (ByteString) -- ^ return value aug_error_message aug_ptr = #ifndef HAS_AUGEAS_ERROR_MESSAGE Prelude.error "aug_error_message requires at least augeas version 0.6.0" Prelude.error (show aug_ptr) -- stop compiler warning #else do cstr <- c_aug_error_message aug_ptr ret <- packCString cstr return(ret) #endif -- ----------------------- -- aug_error_minor_message -- ----------------------- #ifdef HAS_AUGEAS_ERROR_MINOR_MESSAGE foreign import ccall safe "augeas.h aug_error_minor_message" c_aug_error_minor_message :: Ptr Augeas -- aug -> IO (CString) -- return value #endif {-| Return a human-readable message elaborating the error code; might be NULL. For example, when the error code is AUG_EPATHX, this will explain how the path expression is invalid */ -} aug_error_minor_message :: Ptr Augeas -- ^ Augeas pointer -> IO (ByteString) -- ^ return value aug_error_minor_message aug_ptr = #ifndef HAS_AUGEAS_ERROR_MINOR_MESSAGE Prelude.error "aug_error_minor_message requires at least augeas version 0.6.0" Prelude.error (show aug_ptr) -- stop compiler warning #else do cstr <- c_aug_error_minor_message aug_ptr ret <- packCString cstr return(ret) #endif -- ----------------- -- aug_error_details -- ----------------- #ifdef HAS_AUGEAS_ERROR_DETAILS foreign import ccall safe "augeas.h aug_error_details" c_aug_error_details :: Ptr Augeas -- aug -> IO (CString) -- return value #endif {-| Return details about the error, which might be NULL. For example, for AUG_EPATHX, indicates where in the path expression the error occurred. The returned value can only be used until the next API call -} aug_error_details :: Ptr Augeas -- ^ Augeas pointer -> IO (ByteString) -- ^ return value aug_error_details aug_ptr = #ifndef HAS_AUGEAS_ERROR_DETAILS Prelude.error "aug_error_details requires at least augeas version 0.6.0" Prelude.error (show aug_ptr) -- stop compiler warning #else do cstr <- c_aug_error_details aug_ptr ret <- packCString cstr return(ret) #endif augeas-0.6.1/System/AugeasHsc.hsc0000644000175000017500000000660111734600616015260 0ustar judejude-- file: Augeas.hsc -- Haskell bindings for the Augeas library -- Copyright (c) 2009-2012, Jude Nagurney -- This library is free software; you can redistribute it and/or modify it -- under the terms of the GNU Lesser General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This library is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -- License for more details. -- You should have received a copy of the GNU Lesser General Public License -- along with this library; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- Contact the author at -- jude@pwan.org {-# LANGUAGE CPP, ForeignFunctionInterface, EmptyDataDecls, StandaloneDeriving #-} #ifndef _config_h #include "Config.h" #define _config_h #endif module System.AugeasHsc where import Foreign.C.Types import Foreign.Storable #include "augeas.h" -- ---------------------------------- -- Maps to aug_flags enum in augeas.h -- ---------------------------------- newtype AugFlag = AugFlag { unAugFlag :: CInt } deriving (Eq, Show) #{enum AugFlag, AugFlag , none = AUG_NONE , save_backup = AUG_SAVE_BACKUP , save_newfile = AUG_SAVE_NEWFILE , type_check = AUG_TYPE_CHECK , no_stdinc = AUG_NO_STDINC , save_noop = AUG_SAVE_NOOP , no_load = AUG_NO_LOAD , no_modl_autoload = AUG_NO_MODL_AUTOLOAD #ifdef HAS_AUGEAS_SPAN , enable_span = AUG_ENABLE_SPAN #endif } -- --------------------------------- -- Maps to auf_errcode_t in augeas.h -- --------------------------------- newtype AugErrCode = AugErrCode { unAugErrCode :: CInt } deriving (Eq, Show) #{enum AugErrCode, AugErrCode , no_error = AUG_NOERROR , err_no_memory = AUG_ENOMEM , err_internal = AUG_EINTERNAL , err_bad_path = AUG_EPATHX , err_no_match = AUG_ENOMATCH , err_multi_matches = AUG_EMMATCH , err_syntax = AUG_ESYNTAX , err_no_lens = AUG_ENOLENS , err_multi_xfm = AUG_EMXFM #ifdef HAS_AUGEAS_SPAN , err_no_span = AUG_ENOSPAN #endif #ifdef HAS_AUGEAS_SRUN , err_mv_desc = AUG_EMVDESC , err_cmd_run = AUG_ECMDRUN #endif #ifdef HAS_AUGEAS_TO_XML , err_bad_arg = AUG_EBADARG #endif } data AugeasXmlNode #ifdef HAS_AUGEAS_TO_XML #include #let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__) instance Storable AugeasXmlNode where alignment _ = #{alignment xmlNode} sizeOf _ = #{size xmlNode} -- peek ptr = do -- _type <- #{peek xmlNode, type} ptr -- name <- #{peek xmlNode, name} ptr -- children <- #{peek xmlNode, children} ptr -- last <- #{peek xmlNode, last} ptr -- parent <- #{peek xmlNode, parent} ptr -- next <- #{peek xmlNode, next} ptr -- prev <- #{peek xmlNode, prev} ptr -- doc <- #{peek xmlNode, doc} ptr -- return (XmlNode _type name children last parent next prev doc) -- return (XmlNode _type name ) -- poke ptr (XmlNode _type name children last parent next prev doc) = do -- poke ptr (XmlNode _type name) = do -- #{poke xmlNode, type} ptr _type -- #{poke xmlNode, name} ptr name #endifaugeas-0.6.1/configure.ac0000644000175000017500000000411611734600616013717 0ustar judejudeAC_PREREQ(2.65) AC_INIT([haskell-augeas],[0.6.0]) AC_CONFIG_SRCDIR(Setup.hs) AC_CONFIG_HEADERS([Config.h]) AC_ARG_WITH([compiler],[]) CPPFLAGS="$CPPFLAGS -I /usr/include/libxml2" C_INCLUDE_PATH=/usr/include/libxml2 # augeas-specific content has_augeas_init=no AC_SEARCH_LIBS([aug_init],[augeas],[has_augeas_init=yes]) if test "x${has_augeas_init}" = "xyes" ; then AC_CHECK_HEADERS([augeas.h],[],[has_augeas_h=no]) else AC_MSG_ERROR([Unable to find aug_init in an augeas library.]) fi if test "x${has_augeas_h}" = "xno"; then AC_MSG_ERROR([Unable to find augeas.h.]) fi ## Checking for specific augeas lib functions. has_augeas_close=no AC_SEARCH_LIBS([aug_close],[augeas],[has_augeas_close=yes],[has_augeas_close=no]) if test "x${has_augeas_close}" = "xno" ; then AC_MSG_ERROR([Unable to find aug_close in an augeas library.]) fi ## Treat all the rest of the API calls as potentially missing # HAS_AUGEAS_FUNC(library_method_name,config_define_name) AC_DEFUN([HAS_AUGEAS_FUNC], [ has_$1=no AC_SEARCH_LIBS([$1],[augeas],[has_$1=yes]) if test "x${has_$1}" = "xyes"; then AC_DEFINE([$2],[],[Augeas library has the $1 function.]) fi ]) HAS_AUGEAS_FUNC(aug_defvar,HAS_AUGEAS_DEFVAR) HAS_AUGEAS_FUNC(aug_missing,HAS_AUGEAS_MISSING) HAS_AUGEAS_FUNC(aug_defnode,HAS_AUGEAS_DEFNODE) HAS_AUGEAS_FUNC(aug_get,HAS_AUGEAS_GET) HAS_AUGEAS_FUNC(aug_set,HAS_AUGEAS_SET) HAS_AUGEAS_FUNC(aug_setm,HAS_AUGEAS_SETM) HAS_AUGEAS_FUNC(aug_span,HAS_AUGEAS_SPAN) HAS_AUGEAS_FUNC(aug_insert,HAS_AUGEAS_INSERT) HAS_AUGEAS_FUNC(aug_rm,HAS_AUGEAS_RM) HAS_AUGEAS_FUNC(aug_mv,HAS_AUGEAS_MV) HAS_AUGEAS_FUNC(aug_match,HAS_AUGEAS_MATCH) HAS_AUGEAS_FUNC(aug_save,HAS_AUGEAS_SAVE) HAS_AUGEAS_FUNC(aug_load,HAS_AUGEAS_LOAD) HAS_AUGEAS_FUNC(aug_print,HAS_AUGEAS_PRINT) HAS_AUGEAS_FUNC(aug_srun,HAS_AUGEAS_SRUN) HAS_AUGEAS_FUNC(aug_to_xml,HAS_AUGEAS_TO_XML) HAS_AUGEAS_FUNC(aug_error,HAS_AUGEAS_ERROR) HAS_AUGEAS_FUNC(aug_error_message,HAS_AUGEAS_ERROR_MESSAGE) HAS_AUGEAS_FUNC(aug_error_minor_message,HAS_AUGEAS_ERROR_MINOR_MESSAGE) HAS_AUGEAS_FUNC(aug_error_details,HAS_AUGEAS_ERROR_DETAILS) ## fdopen ## fflush ## fclose AC_OUTPUT augeas-0.6.1/Makefile0000644000175000017500000000252011734600616013066 0ustar judejude## file: Makefile ## Haskell bindings for the Augeas library ## Copyright (c) 2009-2012, Jude Nagurney ## This library is free software; you can redistribute it and/or modify it ## under the terms of the GNU Lesser General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at your option) any later version. ## This library is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public ## License for more details. ## You should have received a copy of the GNU Lesser General Public License ## along with this library; if not, write to the Free Software Foundation, ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## Contact the author at ## jude@pwan.org default: library Config.h.in : configure.ac autoreconf library: Config.h.in runghc Setup configure runghc Setup build install: library runghc Setup install copy: library runghc Setup copy register: library runghc Setup register unregister: library runghc Setup unregister clean: rm -rf dist rm -rf Config.h config.log config.status rm -rf autom4te.cache sdist: runghc Setup.hs sdist test: library runghc Setup.hs test docs: runghc Setup.hs haddock augeas-0.6.1/AUTHORS0000644000175000017500000000014611734600616012500 0ustar judejudeWritten by: Jude Nagurney Contributions by: Gwern Branwen augeas-0.6.1/ChangeLog0000644000175000017500000000410711734600616013203 0ustar judejude2012-03-28 Jude Nagurney * Released version 0.6.1 * Added aug_to_xml support 2011-10-15 Jude Nagurney * Released version 0.5.1 * Fixed compilation with with err_mv_desc when using libaugeas < 0.9.0 2011-09-11 Jude Nagurney * Released version 0.5.0 * Added aug_srun API support * Added AUG_EMVDESC and AUG_ECMDRUN support for aug_errcode 2011-04-07 Jude Nagurney * Released version 0.4.0 * Added aug_span API support 2011-02-12 Jude Nagurney * Released version 0.3.5 * Updated source comment heads to refer to LGPL instead of GPL. * Added nomeata's Set-test-buildDir.patch * Handed off Debian packaging to the DHG * Updated spec file based on bugzilla.redhat.org comments 2010-11-19 Jude Nagurney * Released version 0.3.4 * Changed license from GPL to LGPL * Add Fedora and Debian packaging source * Added 'CPP' extension to augeas.cabal 2010-10-24 Jude Nagurney * Released version 0.3.3 * Added testroot files to the sdist * Updated README to tell uses to chmod +x configure 2010-10-17 Jude Nagurney * Released version 0.3.2 * Added missing files to augeas.cabal Extra-Source-Files * Added missing README, THANKS, ChangeLog files to augeas.cabal Data-Files section * Updated Makefile to build Config.h.in * Refactored configure.ac based on blog entry 2010-09-01 Jude Nagurney * Released version 0.3.1 * Fixed issue with aug_load test during 'darcs record' tests 2010-10-17 Jude Nagurney * Released version 0.3.0 * Added aug_setm API support 2010-05-09 Jude Nagurney * Released version 0.2.0 * Extended to cover augeas 0.7.1 API changes * Added AUTHORS file 2009-03-01 Jude Nagurney * Released version 0.1.2 * Removed source-repository reference * Resolved augeas.cabal conflict 2009-03-01 Jude Nagurney * Released version 0.1.1 2009-03-01 Jude Nagurney * Released version 0.1.0 augeas-0.6.1/Config.h.in0000644000175000017500000000561311734600616013417 0ustar judejude/* Config.h.in. Generated from configure.ac by autoheader. */ /* Augeas library has the aug_defnode function. */ #undef HAS_AUGEAS_DEFNODE /* Augeas library has the aug_defvar function. */ #undef HAS_AUGEAS_DEFVAR /* Augeas library has the aug_error function. */ #undef HAS_AUGEAS_ERROR /* Augeas library has the aug_error_details function. */ #undef HAS_AUGEAS_ERROR_DETAILS /* Augeas library has the aug_error_message function. */ #undef HAS_AUGEAS_ERROR_MESSAGE /* Augeas library has the aug_error_minor_message function. */ #undef HAS_AUGEAS_ERROR_MINOR_MESSAGE /* Augeas library has the aug_get function. */ #undef HAS_AUGEAS_GET /* Augeas library has the aug_insert function. */ #undef HAS_AUGEAS_INSERT /* Augeas library has the aug_load function. */ #undef HAS_AUGEAS_LOAD /* Augeas library has the aug_match function. */ #undef HAS_AUGEAS_MATCH /* Augeas library has the aug_missing function. */ #undef HAS_AUGEAS_MISSING /* Augeas library has the aug_mv function. */ #undef HAS_AUGEAS_MV /* Augeas library has the aug_print function. */ #undef HAS_AUGEAS_PRINT /* Augeas library has the aug_rm function. */ #undef HAS_AUGEAS_RM /* Augeas library has the aug_save function. */ #undef HAS_AUGEAS_SAVE /* Augeas library has the aug_set function. */ #undef HAS_AUGEAS_SET /* Augeas library has the aug_setm function. */ #undef HAS_AUGEAS_SETM /* Augeas library has the aug_span function. */ #undef HAS_AUGEAS_SPAN /* Augeas library has the aug_srun function. */ #undef HAS_AUGEAS_SRUN /* Augeas library has the aug_to_xml function. */ #undef HAS_AUGEAS_TO_XML /* Define to 1 if you have the header file. */ #undef HAVE_AUGEAS_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS augeas-0.6.1/testroot/0000775000175000017500000000000011734600616013314 5ustar judejudeaugeas-0.6.1/testroot/etc/0000775000175000017500000000000011734600616014067 5ustar judejudeaugeas-0.6.1/testroot/etc/hosts.reload0000644000175000017500000000051611734600616016417 0ustar judejude127.0.0.1 localhost 127.0.1.1 ubuntu.sys76.lan ubuntu 192.168.0.202 freerunner.home 192.168.0.203 testload.haskell-augeas.org # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts augeas-0.6.1/testroot/etc/hosts0000644000175000017500000000044211734600616015150 0ustar judejude127.0.0.1 localhost 127.0.1.1 ubuntu.sys76.lan ubuntu 192.168.0.202 freerunner.home # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts augeas-0.6.1/Setup.hs0000644000175000017500000000361111734600616013064 0ustar judejude#!/usr/bin/env runhaskell -- file: Setup.hs -- Haskell bindings for the Augeas library -- Copyright (c) 2009-2012 Jude Nagurney -- This library is free software; you can redistribute it and/or modify it -- under the terms of the GNU Lesser General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- This library is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -- License for more details. -- You should have received a copy of the GNU Lesser General Public License -- along with this library; if not, write to the Free Software Foundation, -- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- Contact the author at -- jude@pwan.org import Data.List (isInfixOf) import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo (buildDir) import System.Process -- main = defaultMain -- Thanks http://mechablue.livejournal.com/11055.html main = defaultMainWithHooks autoconfUserHooks { runTests = _runTests, instHook = _instHook } where -- Run all executables with names that end in -tests _runTests _ _ pd lbi = do let exeNames = [buildDir lbi ++ "/" ++ fp ++ "/" ++ fp | fp <- map exeName (executables pd)] sequence [_runTest e | e <- exeNames, isInfixOf "test-" e] return () _runTest fp = do ph <- runCommand fp waitForProcess ph -- Only install executables that don't end in -tests _instHook pd lbi uhs ifs = do let execs = filter (\e -> not $ isInfixOf "test-" (exeName e)) (executables pd) (instHook simpleUserHooks) (pd {executables = execs}) lbi uhs ifs augeas-0.6.1/LICENSE0000644000175000017500000001674311734600616012447 0ustar judejude GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. augeas-0.6.1/configure0000755000175000017500000046701011734600616013346 0ustar judejude#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for haskell-augeas 0.6.0. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='haskell-augeas' PACKAGE_TARNAME='haskell-augeas' PACKAGE_VERSION='0.6.0' PACKAGE_STRING='haskell-augeas 0.6.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="Setup.hs" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_compiler ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures haskell-augeas 0.6.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/haskell-augeas] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of haskell-augeas 0.6.0:";; esac cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF haskell-augeas configure 0.6.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by haskell-augeas $as_me 0.6.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers Config.h" # Check whether --with-compiler was given. if test "${with_compiler+set}" = set; then : withval=$with_compiler; fi CPPFLAGS="$CPPFLAGS -I /usr/include/libxml2" C_INCLUDE_PATH=/usr/include/libxml2 # augeas-specific content has_augeas_init=no ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_init" >&5 $as_echo_n "checking for library containing aug_init... " >&6; } if ${ac_cv_search_aug_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_init (); int main () { return aug_init (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_init+:} false; then : break fi done if ${ac_cv_search_aug_init+:} false; then : else ac_cv_search_aug_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_init" >&5 $as_echo "$ac_cv_search_aug_init" >&6; } ac_res=$ac_cv_search_aug_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_augeas_init=yes fi if test "x${has_augeas_init}" = "xyes" ; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in augeas.h do : ac_fn_c_check_header_mongrel "$LINENO" "augeas.h" "ac_cv_header_augeas_h" "$ac_includes_default" if test "x$ac_cv_header_augeas_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_AUGEAS_H 1 _ACEOF else has_augeas_h=no fi done else as_fn_error $? "Unable to find aug_init in an augeas library." "$LINENO" 5 fi if test "x${has_augeas_h}" = "xno"; then as_fn_error $? "Unable to find augeas.h." "$LINENO" 5 fi ## Checking for specific augeas lib functions. has_augeas_close=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_close" >&5 $as_echo_n "checking for library containing aug_close... " >&6; } if ${ac_cv_search_aug_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_close (); int main () { return aug_close (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_close=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_close+:} false; then : break fi done if ${ac_cv_search_aug_close+:} false; then : else ac_cv_search_aug_close=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_close" >&5 $as_echo "$ac_cv_search_aug_close" >&6; } ac_res=$ac_cv_search_aug_close if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_augeas_close=yes else has_augeas_close=no fi if test "x${has_augeas_close}" = "xno" ; then as_fn_error $? "Unable to find aug_close in an augeas library." "$LINENO" 5 fi ## Treat all the rest of the API calls as potentially missing # HAS_AUGEAS_FUNC(library_method_name,config_define_name) has_aug_defvar=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_defvar" >&5 $as_echo_n "checking for library containing aug_defvar... " >&6; } if ${ac_cv_search_aug_defvar+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_defvar (); int main () { return aug_defvar (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_defvar=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_defvar+:} false; then : break fi done if ${ac_cv_search_aug_defvar+:} false; then : else ac_cv_search_aug_defvar=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_defvar" >&5 $as_echo "$ac_cv_search_aug_defvar" >&6; } ac_res=$ac_cv_search_aug_defvar if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_defvar=yes fi if test "x${has_aug_defvar}" = "xyes"; then $as_echo "#define HAS_AUGEAS_DEFVAR /**/" >>confdefs.h fi has_aug_missing=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_missing" >&5 $as_echo_n "checking for library containing aug_missing... " >&6; } if ${ac_cv_search_aug_missing+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_missing (); int main () { return aug_missing (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_missing=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_missing+:} false; then : break fi done if ${ac_cv_search_aug_missing+:} false; then : else ac_cv_search_aug_missing=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_missing" >&5 $as_echo "$ac_cv_search_aug_missing" >&6; } ac_res=$ac_cv_search_aug_missing if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_missing=yes fi if test "x${has_aug_missing}" = "xyes"; then $as_echo "#define HAS_AUGEAS_MISSING /**/" >>confdefs.h fi has_aug_defnode=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_defnode" >&5 $as_echo_n "checking for library containing aug_defnode... " >&6; } if ${ac_cv_search_aug_defnode+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_defnode (); int main () { return aug_defnode (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_defnode=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_defnode+:} false; then : break fi done if ${ac_cv_search_aug_defnode+:} false; then : else ac_cv_search_aug_defnode=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_defnode" >&5 $as_echo "$ac_cv_search_aug_defnode" >&6; } ac_res=$ac_cv_search_aug_defnode if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_defnode=yes fi if test "x${has_aug_defnode}" = "xyes"; then $as_echo "#define HAS_AUGEAS_DEFNODE /**/" >>confdefs.h fi has_aug_get=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_get" >&5 $as_echo_n "checking for library containing aug_get... " >&6; } if ${ac_cv_search_aug_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_get (); int main () { return aug_get (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_get=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_get+:} false; then : break fi done if ${ac_cv_search_aug_get+:} false; then : else ac_cv_search_aug_get=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_get" >&5 $as_echo "$ac_cv_search_aug_get" >&6; } ac_res=$ac_cv_search_aug_get if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_get=yes fi if test "x${has_aug_get}" = "xyes"; then $as_echo "#define HAS_AUGEAS_GET /**/" >>confdefs.h fi has_aug_set=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_set" >&5 $as_echo_n "checking for library containing aug_set... " >&6; } if ${ac_cv_search_aug_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_set (); int main () { return aug_set (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_set=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_set+:} false; then : break fi done if ${ac_cv_search_aug_set+:} false; then : else ac_cv_search_aug_set=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_set" >&5 $as_echo "$ac_cv_search_aug_set" >&6; } ac_res=$ac_cv_search_aug_set if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_set=yes fi if test "x${has_aug_set}" = "xyes"; then $as_echo "#define HAS_AUGEAS_SET /**/" >>confdefs.h fi has_aug_setm=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_setm" >&5 $as_echo_n "checking for library containing aug_setm... " >&6; } if ${ac_cv_search_aug_setm+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_setm (); int main () { return aug_setm (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_setm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_setm+:} false; then : break fi done if ${ac_cv_search_aug_setm+:} false; then : else ac_cv_search_aug_setm=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_setm" >&5 $as_echo "$ac_cv_search_aug_setm" >&6; } ac_res=$ac_cv_search_aug_setm if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_setm=yes fi if test "x${has_aug_setm}" = "xyes"; then $as_echo "#define HAS_AUGEAS_SETM /**/" >>confdefs.h fi has_aug_span=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_span" >&5 $as_echo_n "checking for library containing aug_span... " >&6; } if ${ac_cv_search_aug_span+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_span (); int main () { return aug_span (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_span=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_span+:} false; then : break fi done if ${ac_cv_search_aug_span+:} false; then : else ac_cv_search_aug_span=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_span" >&5 $as_echo "$ac_cv_search_aug_span" >&6; } ac_res=$ac_cv_search_aug_span if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_span=yes fi if test "x${has_aug_span}" = "xyes"; then $as_echo "#define HAS_AUGEAS_SPAN /**/" >>confdefs.h fi has_aug_insert=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_insert" >&5 $as_echo_n "checking for library containing aug_insert... " >&6; } if ${ac_cv_search_aug_insert+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_insert (); int main () { return aug_insert (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_insert=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_insert+:} false; then : break fi done if ${ac_cv_search_aug_insert+:} false; then : else ac_cv_search_aug_insert=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_insert" >&5 $as_echo "$ac_cv_search_aug_insert" >&6; } ac_res=$ac_cv_search_aug_insert if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_insert=yes fi if test "x${has_aug_insert}" = "xyes"; then $as_echo "#define HAS_AUGEAS_INSERT /**/" >>confdefs.h fi has_aug_rm=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_rm" >&5 $as_echo_n "checking for library containing aug_rm... " >&6; } if ${ac_cv_search_aug_rm+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_rm (); int main () { return aug_rm (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_rm=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_rm+:} false; then : break fi done if ${ac_cv_search_aug_rm+:} false; then : else ac_cv_search_aug_rm=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_rm" >&5 $as_echo "$ac_cv_search_aug_rm" >&6; } ac_res=$ac_cv_search_aug_rm if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_rm=yes fi if test "x${has_aug_rm}" = "xyes"; then $as_echo "#define HAS_AUGEAS_RM /**/" >>confdefs.h fi has_aug_mv=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_mv" >&5 $as_echo_n "checking for library containing aug_mv... " >&6; } if ${ac_cv_search_aug_mv+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_mv (); int main () { return aug_mv (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_mv=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_mv+:} false; then : break fi done if ${ac_cv_search_aug_mv+:} false; then : else ac_cv_search_aug_mv=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_mv" >&5 $as_echo "$ac_cv_search_aug_mv" >&6; } ac_res=$ac_cv_search_aug_mv if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_mv=yes fi if test "x${has_aug_mv}" = "xyes"; then $as_echo "#define HAS_AUGEAS_MV /**/" >>confdefs.h fi has_aug_match=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_match" >&5 $as_echo_n "checking for library containing aug_match... " >&6; } if ${ac_cv_search_aug_match+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_match (); int main () { return aug_match (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_match=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_match+:} false; then : break fi done if ${ac_cv_search_aug_match+:} false; then : else ac_cv_search_aug_match=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_match" >&5 $as_echo "$ac_cv_search_aug_match" >&6; } ac_res=$ac_cv_search_aug_match if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_match=yes fi if test "x${has_aug_match}" = "xyes"; then $as_echo "#define HAS_AUGEAS_MATCH /**/" >>confdefs.h fi has_aug_save=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_save" >&5 $as_echo_n "checking for library containing aug_save... " >&6; } if ${ac_cv_search_aug_save+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_save (); int main () { return aug_save (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_save=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_save+:} false; then : break fi done if ${ac_cv_search_aug_save+:} false; then : else ac_cv_search_aug_save=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_save" >&5 $as_echo "$ac_cv_search_aug_save" >&6; } ac_res=$ac_cv_search_aug_save if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_save=yes fi if test "x${has_aug_save}" = "xyes"; then $as_echo "#define HAS_AUGEAS_SAVE /**/" >>confdefs.h fi has_aug_load=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_load" >&5 $as_echo_n "checking for library containing aug_load... " >&6; } if ${ac_cv_search_aug_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_load (); int main () { return aug_load (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_load=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_load+:} false; then : break fi done if ${ac_cv_search_aug_load+:} false; then : else ac_cv_search_aug_load=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_load" >&5 $as_echo "$ac_cv_search_aug_load" >&6; } ac_res=$ac_cv_search_aug_load if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_load=yes fi if test "x${has_aug_load}" = "xyes"; then $as_echo "#define HAS_AUGEAS_LOAD /**/" >>confdefs.h fi has_aug_print=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_print" >&5 $as_echo_n "checking for library containing aug_print... " >&6; } if ${ac_cv_search_aug_print+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_print (); int main () { return aug_print (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_print=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_print+:} false; then : break fi done if ${ac_cv_search_aug_print+:} false; then : else ac_cv_search_aug_print=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_print" >&5 $as_echo "$ac_cv_search_aug_print" >&6; } ac_res=$ac_cv_search_aug_print if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_print=yes fi if test "x${has_aug_print}" = "xyes"; then $as_echo "#define HAS_AUGEAS_PRINT /**/" >>confdefs.h fi has_aug_srun=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_srun" >&5 $as_echo_n "checking for library containing aug_srun... " >&6; } if ${ac_cv_search_aug_srun+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_srun (); int main () { return aug_srun (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_srun=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_srun+:} false; then : break fi done if ${ac_cv_search_aug_srun+:} false; then : else ac_cv_search_aug_srun=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_srun" >&5 $as_echo "$ac_cv_search_aug_srun" >&6; } ac_res=$ac_cv_search_aug_srun if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_srun=yes fi if test "x${has_aug_srun}" = "xyes"; then $as_echo "#define HAS_AUGEAS_SRUN /**/" >>confdefs.h fi has_aug_to_xml=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_to_xml" >&5 $as_echo_n "checking for library containing aug_to_xml... " >&6; } if ${ac_cv_search_aug_to_xml+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_to_xml (); int main () { return aug_to_xml (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_to_xml=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_to_xml+:} false; then : break fi done if ${ac_cv_search_aug_to_xml+:} false; then : else ac_cv_search_aug_to_xml=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_to_xml" >&5 $as_echo "$ac_cv_search_aug_to_xml" >&6; } ac_res=$ac_cv_search_aug_to_xml if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_to_xml=yes fi if test "x${has_aug_to_xml}" = "xyes"; then $as_echo "#define HAS_AUGEAS_TO_XML /**/" >>confdefs.h fi has_aug_error=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_error" >&5 $as_echo_n "checking for library containing aug_error... " >&6; } if ${ac_cv_search_aug_error+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_error (); int main () { return aug_error (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_error=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_error+:} false; then : break fi done if ${ac_cv_search_aug_error+:} false; then : else ac_cv_search_aug_error=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_error" >&5 $as_echo "$ac_cv_search_aug_error" >&6; } ac_res=$ac_cv_search_aug_error if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_error=yes fi if test "x${has_aug_error}" = "xyes"; then $as_echo "#define HAS_AUGEAS_ERROR /**/" >>confdefs.h fi has_aug_error_message=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_error_message" >&5 $as_echo_n "checking for library containing aug_error_message... " >&6; } if ${ac_cv_search_aug_error_message+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_error_message (); int main () { return aug_error_message (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_error_message=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_error_message+:} false; then : break fi done if ${ac_cv_search_aug_error_message+:} false; then : else ac_cv_search_aug_error_message=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_error_message" >&5 $as_echo "$ac_cv_search_aug_error_message" >&6; } ac_res=$ac_cv_search_aug_error_message if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_error_message=yes fi if test "x${has_aug_error_message}" = "xyes"; then $as_echo "#define HAS_AUGEAS_ERROR_MESSAGE /**/" >>confdefs.h fi has_aug_error_minor_message=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_error_minor_message" >&5 $as_echo_n "checking for library containing aug_error_minor_message... " >&6; } if ${ac_cv_search_aug_error_minor_message+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_error_minor_message (); int main () { return aug_error_minor_message (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_error_minor_message=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_error_minor_message+:} false; then : break fi done if ${ac_cv_search_aug_error_minor_message+:} false; then : else ac_cv_search_aug_error_minor_message=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_error_minor_message" >&5 $as_echo "$ac_cv_search_aug_error_minor_message" >&6; } ac_res=$ac_cv_search_aug_error_minor_message if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_error_minor_message=yes fi if test "x${has_aug_error_minor_message}" = "xyes"; then $as_echo "#define HAS_AUGEAS_ERROR_MINOR_MESSAGE /**/" >>confdefs.h fi has_aug_error_details=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing aug_error_details" >&5 $as_echo_n "checking for library containing aug_error_details... " >&6; } if ${ac_cv_search_aug_error_details+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char aug_error_details (); int main () { return aug_error_details (); ; return 0; } _ACEOF for ac_lib in '' augeas; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_aug_error_details=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_aug_error_details+:} false; then : break fi done if ${ac_cv_search_aug_error_details+:} false; then : else ac_cv_search_aug_error_details=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_aug_error_details" >&5 $as_echo "$ac_cv_search_aug_error_details" >&6; } ac_res=$ac_cv_search_aug_error_details if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" has_aug_error_details=yes fi if test "x${has_aug_error_details}" = "xyes"; then $as_echo "#define HAS_AUGEAS_ERROR_DETAILS /**/" >>confdefs.h fi ## fdopen ## fflush ## fclose cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by haskell-augeas $as_me 0.6.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration headers: $config_headers Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ haskell-augeas config.status 0.6.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Config.h") CONFIG_HEADERS="$CONFIG_HEADERS Config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi augeas-0.6.1/THANKS0000644000175000017500000000055311734600616012345 0ustar judejudehaskell-augeas package THANKS file "Dear Amigo - Dear Partner. Listen, uh - I just want to say thanks. So...thanks." Gwern Branwen (Contributions) Joachim Breitner (Contributions / Debian Packaging) John Calcote (Autotools book) Don Stewart (Reporting a Bug / Real World Haskell)