LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2007, 05:01 AM   #1
rompelstilchen
LQ Newbie
 
Registered: Nov 2006
Posts: 9

Rep: Reputation: 0
How to setup the install dir of a library


Hello,

I wrote a lib and compiled it (yes , good for me)

I changed the --prefix of my configure command as /usr/lib/mylib
I use a "mylib.pc" file for pkgconfig
although I don't see the point
so i got
/usr/src/mylib/data/...

/usr
/lib
/mylib
/include
/lib

great!

how do I modify the makefile.am or pc file to have my data files copied to /usr/lib/mylib/data or something, at install time ?
 
Old 02-02-2007, 09:05 PM   #2
hellwolf
LQ Newbie
 
Registered: Jan 2005
Location: China
Distribution: Fedora 3
Posts: 2

Rep: Reputation: 0
Add a file to your AC_CONFIG_FILES
for example:
Code:
AC_CONFIG_FILES([
...
lib/XX/XX.pc
...
you create lib/XX/XX.pc.in like this:
Code:
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
libxx_incdir=@XX_INCDIR@

Name: libnetserpent
Description: Library providing the interfaces for the libxx
Version: @XX_VERSION@
Requires:
Cflags: -I${libxx_incdir}
Libs: -lxx -L${libdir}
the XX_INCDIR and XX_VERSIN should be AC_SUBST in your configure.ac

and your lib/XX/Makefile.am like this:
Code:
...
pkgconfigdir   = $(libdir)/pkgconfig
pkgconfig_DATA = xx.pc

DISTCLEANFILES = $(pkgconfig_DATA)
...
Hope I catched your meaning.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Q. moving /bin dir files to /dev dir?? Texas_student Linux - Software 2 03-26-2006 11:42 PM
Share configuratin dir (.dir) for 3 accounts on local computer LiNuXkOlOnIe Linux - Software 5 01-08-2006 03:36 AM
how to setup quota on user dir in nis server tulip4heaven Linux - Networking 1 09-14-2005 05:22 AM
Default install dir? hongman Linux - Newbie 4 02-20-2005 01:07 PM
how do you install a dir in linux james Harvey Linux - Newbie 3 05-28-2002 02:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration