SoftwareSerial.h alternative with AVR (Two Serial/UART ports in atmega328p) Arduino pins can be used as UART using the SoftwareSerial.h library. Is there any alternative for AVR?

I need more than one serial port on a ATmega328P, but i don't use Arduino. 

SoftwareSerial.h is tied to Arduino.h and Arduino pins. I do not use Arduino, i use avr-gcc with atmega328p and atmega8.
AVR274 describes a single-wire, half-duplex software UART.

AVR304 describes a half-duplex, interrupt-driven software UART, and AVR305 describes a polled alternative.

AVR307 describes implementing a half-duplex UART using a USI.

All code associated with each app note can be downloaded from Atmel's website.