Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6052593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:56:44+00:00 2026-05-23T07:56:44+00:00

My application uses autotools to install data files that are needed at runtime in

  • 0

My application uses autotools to install data files that are needed at runtime in $pkgdatadir. Part of the application is written in C, and the path to the data directory is set by the following statement in Makefile.am:

AM_CPPFLAGS = -DAM_DATADIR='"$(pkgdatadir)"'

But I also need to have access to this data directory from various Perl and shell scripts. Is there a common approach to this problem other modifying the scripts during installation?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:56:44+00:00Added an answer on May 23, 2026 at 7:56 am

    This problem is mentioned in the autoconf documentation, and the recommended solution is to build the scripts during make time (before install). It’s not clear to me if this solution is what you mean by “modifying the scripts during installation”, but this is really the only viable solution since pkgdatadir is only defined in the Makefile, so make must be used (unless you want to adopt the extremely fragile approach of attempting to duplicate the definition of pkgdatadir outside of the Makefile.)

    This is the best link I could find just now: http://www.delorie.com/gnu/docs/autoconf/autoconf_24.html. The relevant portion describes the following sample make snippet to build autoconf and autoheader:

    
    edit = sed \
            -e 's,@datadir[@],$(pkgdatadir),g' \
            -e 's,@prefix[@],$(prefix),g'
    
    autoconf: Makefile $(srcdir)/autoconf.in
            rm -f autoconf autoconf.tmp
            $(edit) $(srcdir)/autoconf.in >autoconf.tmp
            chmod +x autoconf.tmp
            mv autoconf.tmp autoconf
    
    autoheader: Makefile $(srcdir)/autoheader.in
            rm -f autoheader autoheader.tmp
            $(edit) $(srcdir)/autoconf.in >autoheader.tmp
            chmod +x autoheader.tmp
            mv autoheader.tmp autoheader
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application uses a data directory on the SD card to store files. At
Our application uses Hibernate for ORM, and stores data in several schemas, accessing them
Our application uses a large product database that is updated once a day. Updates
My application uses some session variables that are timing out even though I thought
My application uses MS access database to save some sensitive information. Though that information
Our application uses a XML configuation file. I thought that it would be nice
My application uses a remote service to play audio. I do this so that
My application uses SendKeys to navigate through and enter data into the input fields
My application uses Lucene.NET to index various text files. Since each text file is
My application uses the PersistentStore to store data. The keys of the PersistentStore are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.